A Moroccan court has given the country’s only oil refinery, Samir, another six months to restart production, allowing it to have more time to attract buyers, Reuters reported. Samir, which halted production last August and had been placed in liquidation, had previously announced it would resume production in mid-June. However, the deadline was not met after the trustee had failed to attract bids for tenders to buy crude oil.

The latest ruling compels the trustee to restart production in January 21st, 2017 and bring the liquidation process to an end.

Meanwhile, the refinery has been battling creditors ranging from oil traders to banks who are owed millions. The Moroccan government says Samir owes it $1.33b in taxes and its total debt is hovering around $4.5b.

Samir’s closure has made the country reliant on imports at a time when the North African kingdom is getting its finances back on track by tackling huge deficits, according to London South East. The company, however, is still paying salaries and social contributions for its 1,200 workers.