UPDATE 1-Spain court gives Abengoa until Oct 28 to restructure debt

(Adds new details, background)

MADRID, April 6 (Reuters) - A Spanish court has granted renewable energy firm Abengoa an additional seven months to strike a debt restructuring deal with creditors and avoid becoming the country’s biggest ever bankruptcy.

The Seville-based court said Abengoa had until October 28 to convince banks and bondholders which have not already signed off on a restructuring agreement backed by a group of creditors to do so.

Under this deal, some creditors would lend up to 1.8 billion euros to the company over a period of five years, giving them the right to 55 percent of the restructured company.

Simultaneously, around 70 percent of existing debt would be swapped for equity, giving those other creditors the right to 35 percent of the company, Abengoa said.

Creditors who advanced an additional 800 million euros in financial guarantees to develop projects would get 5 percent of the restructured company.

The court decision means that Abengoa, struggling under a 9.4 billion euros ($10.7 billion) debt pile, will remain under creditor protection for the time being.

The firm, which started out 70 years ago as an engineering business in Seville and expanded into clean energy by taking on huge debts, was brought to its knees last year when its lenders refused to extend credit lines.

Abengoa had sought preliminary creditor protection in November last year. ($1 = 0.8809 euros) (Reporting by Jesús Aguado; Editing by Julien Toyer and Keith Weir)