Reform of the power sector, the fifth in as many years, is intended to eliminate a gap between the cost of producing energy and what consumers pay for it, which has built up a debt of 26 billion euros (22.0 billion pounds) over 13 years.

That debt, which sits on the books of private utilities who paid the bill but is backed by taxpayers, has come under European Union scrutiny as Spain battles to keep its budget deficit in check.

The government of centre-right Prime Minister Mariano Rajoy is expected to unveil new rules on June 21 or June 28, including harsh cuts to a range of power subsidies in an attempt to close the gap - known as the tariff deficit - once and for all, industry and government sources said.

Renewable energy firms such as Acciona (>> Acciona SA) and Abengoa (>> Abengoa SA), which have relied heavily on government support, will be hardest hit.

Consumers will escape the pain for now, but a review of the formula for calculating power bills is expected to be finished later in the year.

Spain, in its fifth year of on-off recession, has already cut back on lucrative subsidies for renewable energy that made it the world's No. 4 wind power generator and the No. 2 solar power generator. Those policies as well as subsidies for providing power to remote islands, were largely responsible for the tariff deficit.

The new round of cuts could make some solar projects unviable and sour loans that banks made to green energy projects at a time when the government promised consistent subsidies and stable returns, energy sector sources said.

Months of tension over the likely reforms reached a climax this month when the government asked banks to refinance debt held by renewable energy firms expected to be hit by subsidy cuts, industry and banking sources said.

Representatives of some of Spain and Europe's biggest banks stormed out of a meeting with Spain's secretary of state for energy, Alberto Nadal, furious over the proposal.

The banks included Santander (>> Banco Santander, S.A.), BBVA (>> Banco Bilbao Vizcaya Argentaria S.A.), Barclays (>> Barclays PLC), BNP Paribas (>> BNP PARIBAS), and Espirito Santo (>> BANCO ESPIRITO SANTO), sources familiar with the situation said.

Spain's photovoltaic and solarthermal sectors have total debt of about 28 billion euros, about two thirds of which is held by Spanish banks, according to estimates by sector trade association UNEF.

Banks, which have already had to write down more than 300 billion euros of toxic property assets and loans in Spain, face having to recognize billions of euros of further losses on loans to energy projects if the reforms force some solar projects to shut down.

Small solar power producers have seen revenue drop 40 percent due to the impact of previous reforms, according to the National Association of Energy Producers, ANPIER, which represents more than 4,000 photovoltaic investors.

HARSH MEDICINE

Even after earlier cuts, renewable energy gets nearly half of all state support for the overall sector.

Industry sources forecast additional cuts of at least 10 percent for renewables, hitting listed companies like Acciona and Abengoa and potentially triggering further lawsuits against the government by green energy investors already furious over a series of changes in the rules.

Seeking legally safe formulas for reform, Industry Minister Jose Manuel Soria said last week Spain could link guaranteed profit for renewable energy companies and other regulated power costs to treasury yields in the review.

To stop the tariff deficit from expanding further Soria must still cut about 4 billion euros from total costs of 20 billion, which aside from subsidies for renewables, coal and nuclear include payments to big utilities to keep extra capacity on hand and for power transportation.

Analysts forecast a 10 percent across-the-board cut to these payments, hitting profits at utilities Iberdrola (>> Iberdrola SA), Enel-controlled Endesa (>> Enel S.p.A.) (>> Endesa SA) and Gas Natural (>> Gas Natural SDG SA) and electricity and gas grid operators Red Electrica (>> Red Electrica Corporacion SA) and Enagas (>> Enagas SA).

Of the big utilities, Endesa may be the hardest hit because of its power generation on the Spanish islands, which also benefits from significant state subsidies.

In a note to clients, Berenberg bank estimated such cuts to knock 14 percent off of Endesa's earnings per share, followed by a 9 percent hit for Enel and 8 percent for Gas Natural and Iberdrola.

The companies' shares have mostly priced in regulatory uncertainty and analysts say the final outcome of the reform, barring particularly nasty cuts, could finally bring a safer investment climate to the sector.

Madrid has been gradually paying back the tariff deficit through the issuance of government-backed bonds and the reform may contain plans for more securitisations.

(Additional reporting by Andres Gonzalez, Carlos Ruano and Jose Elias Rodriguez; Editing by Fiona Ortiz and Erica Billingham)

By Tracy Rucinski