MADRID- The Spanish government is planning to extend the maturities of some state-backed loans to up to 12 years as part of a package to support mid-sized companies amid the COVID-19 pandemic, two sources familiar with the matter said on Monday.

The measures, which may also include an extension of a freeze on loan repayments beyond the current grace period of up to two years, could be approved by the cabinet as soon as Tuesday, jointly with a code of good practice that banks are encouraged to implement, the sources said.

The government declined to comment.

Companies will be given until the end of November to ask for an extension of state-backed credits known as ICO loans, which until now had a duration of up to eight years, they said.

Under the code, Spanish banks will apply voluntary write-offs of state loans as a part of a 3 billion euro ($3.65 billion) debt restructuring plan for companies whose revenues fell at least 30% in 2020 compared to 2019.

The write-offs will be implemented under the potential losses scheme set by each ICO loan, one of the sources said.

In March, the government approved an 11 billion euro relief package, including 7 billion euros in direct aid to help firms, the 3 billion in debt restructurings and 1 billion in capital injections. 

Spanish companies have been among the most active in Europe applying for state-backed credit and liquidity lines, mobilizing 125.7 billion euros in total funding.

Banks and companies have negotiated grace periods as part of their credit lines for two years, and the new code will also enable them to potentially extend those repayment freezes on a case-by-case basis.

As in other European countries the focus has been switching to solvency issues from liquidity, and Spanish companies will also be able to apply for participatory loans, a hybrid debt instrument that can be converted into capital.

A financial source said banks would be able to increase the cost on those hybrid loans if approved by the majority of the lenders. ($1 = 0.8219 euros)

(Reporting by Jesus Aguado; Editing by Andrei Khalip and Andrew Cawthorne) ((jesus.aguado@thomsonreuters.com; +34 91 585 8339; Reuters Messaging: Reuters Messaging: jesus.aguado.reuters.com@reuters.net))