Sun-drenched Spain should be a natural for solar energy, and it is here that the technology is making an effort to stand on its feet financially without subsidies.
Investors are now betting again on solar power generation in Spain, which for a decade was in the shadows as the country cut subsidies for the clean but expensive source of energy.
A plunge in the price of solar panels and lower construction costs has changed the maths, and new projects are moving forward again.
Iberdrola, Spain's largest power company, this month launched a solar project with a capacity of 425 megawatts.
And last week Spanish renewable energy firm Cox Energy signed a deal for the construction of 495 megawatts of capacity in Spain, and another 165 megawatts in neighbouring Portugal, in a 400-million-euro ($490 million) investment.
Companies have sought authorisation for solar power projects across Spain with a total capacity of 24,000 megawatts, according to the director general of Spanish solar power lobby UNEF, Jose Donoso.
That is the equivalent of 14 of the latest generation nuclear power plants that France hopes to launch later this year, after a decade of costly construction.
Spain was one of the pioneers of solar power-generation. Subsidies in the form of a high purchase price for solar power lured investors and homeowners to install solar panels, triggering an installation boom in 2008 that saw Spain's installed capacity jump five times to 3,355 megawatts.
But the global financial crisis, which ravaged Spain via a collapse of the property market, led to a bust in new projects and the cash-strapped government was quickly forced to abandon the subsidies.
Just 49 megawatts was added in 2015, and 55 megawatts in 2016, before picking up to 135 megawatts in 2017, according to UNEF figures.
However in Germany, which kept up its subsidies, solar power swelled by six times although the country does not receive as much sun as Spain, meaning each panel produces less electricity.
The country now has more than 40,000 megawatts of solar power, compared with 5,400 in Spain at the end of 2015.
But the sector has undergone "a complete reversal in less than six months", according to Donoso.
One reason is that solar panels can now produce electricity at a lower price than traditional power sources such as coal, gas and nuclear.
The cost of solar power production plunged 73 percent between 2010 and 2017, according the International Renewable Energy Agency (Irena), which predicts it will continue to fall.
Companies also realised the projects didn't need guaranteed prices from the state.
A tender for solar power projects launched by the government in July had so many bids that the price was capped at 30-31 euros per megawatt hour.
According to the European statistical agency Eurostat, non-residential customers in Spain paid an average 107 euros per megawatt hour last year.
Investors concluded that "it is better to run risks in the market then depend on regulated demand", Donoso said.
Moreover, investors into renewables know how much construction and operation will cost them, while traditional power stations have only a limited ability to lock in prices for fuel.
"It is much more profitable to invest in capital-intensive technologies (like photovoltaic power) than technologies where the raw material comes at a cost" like gas or coal, said the president of renewable energy lobby group Fundacion Renovables, Fernando Ferrando.
Room to grow
Donoso said this explains why major Spanish power firms such as Iberdrola "who stood aside from this sector" have suddenly jumped in.
"The Spanish market will certainly be one of the biggest in Europe in the coming years," he added.
A group set up by the government proposes setting as a goal having a total of 30,000-60,000 gigawatts of installed solar capacity by 2020, Donoso said.
Spain's conservative government has so far not made solar power a priority, said Ferrando.
"We only use the sun for tourism not for electricity," he said.
Solar power represents just 3-4 percent of electrical power production in Spain, compared with 20 percent for wind power and 16-17 percent for hydroelectric power, according to the lobby group.
Explore further: Clouds gather over Spain's renewables sector as aid cut