A wind of change is blowing on Spain's renewables: companies and investment funds have been on a buying spree, taking advantage of the know-how and growth prospects of a sector still limping out of a crisis.
In 2015 "total transactions reached 5 billion euros ($5.7 billion)", says Joao Saint-Aubyn, a Madrid-based energy expert at global consultancy Roland Berger.
The biggest by far were the acquisition last year by US private equity firm Cerberus of renewables specialist Renovalia for about one billion euros, and investment group KKR's buy-out of solar group Gestamp Solar for a similar amount.
And the spending frenzy is unlikely to die down, as German giant Siemens eyes up wind power group Gamesa, and Cerberus is thought to be considering joining forces with US billionaire George Soros to devour T-Solar and its solar farms.
"Spain's renewable energy sector is one of the biggest in the world," says Saint-Aubyn.
Last year, Spain was in fifth position worldwide for wind power, with installed capacity of 23 gigawatts—the equivalent of 23 nuclear reactors—and in eighth place for solar power after China, the United States and Germany.
This high ranking came despite near-zero investment in the sector over the past few years as the economic crisis hit.
Sun aplenty and wind-swept regions make the country an ideal candidate for renewables, but generous subsidies doled out by the former Socialist government of Jose Luis Rodriguez Zapatero really helped get the 70,000-strong sector going, until the financial crisis hit in 2008.
The Socialists were forced to implement spending cuts as the country teetered on the edge of bankruptcy, and the conservatives continued this policy after they came to power in 2011.
Potential investors had balked at the cut in subsidies, and had generally been wary of the general state of the Spanish economy.
No longer, though.
Why Spain? Why now?
Spain's return to growth—its economy expanded 3.2 percent last year—and pledges by authorities to stop changing the sector's regulations have attracted investors back to the country.
The fact that renewable companies can no longer count on as many subsidies as they once could have reduced the value of their assets, making them more attractive for buyers, says Luis Polo, head of the AEE Spanish Wind Energy Association.
And Spanish companies are "on the cutting-edge internationally," says Borja Rubio, an analyst for brokers XTB.
Spain has long been associated with windmills thanks to Miguel de Cervantes's famous novel "Don Quixote", but it now boasts leading research centres such as the giant Almeria Solar Platform in a deserted, arid region in the south of the country.
The country's engineers also continue to innovate, and have for instance developed the prototype for a bladeless wind turbine.
Polo adds that another strong point of Spain's wind energy sector is that companies involved in the entire production line are present in the country.
The know-how of companies has allowed them "to win projects elsewhere in the world," says Rubio.
Gamesa for instance is among the world's five biggest wind turbine manufacturers and is well established in several emerging countries like India, Brazil and China—of high interest to Siemens.
In order to keep growing, however, they need money.
"But many (wind farm) owners are struggling to cope with their debt," says the AEE, after the sharp drop in public subsidies.
The situation is hardly any better in the solar sector.
T-Solar for instance is heavily indebted and renewables giant Abengoa is on the verge of bankruptcy.
In comparison, private equity firms have a lot of cash for acquisitions.
And ultimately, the renewables sector has good prospects, particularly after 175 countries agreed to slow down global warming in a historic deal signed in December in Paris.
Explore further: Spain wants to retake lead in renewable energy