Coal power is no longer competitive in mainland Spain, according to Enel subsidiary Endesa, as the company plans to shut down all of its coal-fired generation capacity on the Iberian peninsula.

Endesa operates 23 gigawatts of capacity in total in Spain and Portugal, including 7.5 gigawatts of “traditional thermal power."

In a statement to the Spanish stock exchange, Endesa was unequivocal on its view of coal’s near-term future, blaming market conditions and carbon pricing.

“This structural situation has determined that mainland coal-fired thermal power plants are not competitive, and therefore their operation in the electricity generation market is not foreseeable in the future.”

Endesa flagged a likely write-down of €1.3 billion ($1.4 billion) as a result of the shutdown, including decommissioning costs. It did not provide a timeline.

In the first half of 2019, the company generated half as much power from its coal fleet as it did in the same period last year, without closing any capacity. That alone suggests the writing was very much on the wall.

In November last year, Spain’s government said its last coal and nuclear power plants would be closed by 2030. It also revealed tax breaks for natural gas that were not extended to coal.

Endesa’s CEO responded at the time by saying he expected the coal plants to remain in place for backup beyond 2030. A few months later he was quoted saying the shutdown could be complete by 2025.

Spain is targeting a 100 percent renewables electricity system by 2050.

Endesa is taking its lead from Italian parent company Enel with a series of investments in energy storage, large-scale solar and electric vehicle charging.

Last week Endesa added Enel Green Power CEO Antonio Cammisecra to its board of directors.

Enel Green Power is one of the world's leading developers and operators of renewables capacity, with more than 43 gigawatts of solar, wind, hydro and geothermal power under management in the Americas, Europe, Australia and Asia.

Europe's coal phaseout

Nuclear-heavy France has Europe's most aggressive coal phaseout plans with a target year of 2022.

As of this summer Italy, the U.K. and Ireland (all with 2025 targets), along with Denmark, Spain, Netherlands, Portugal and Finland (2030) had firm plans in place.

Germany, Europe’s largest economy, is legislating for a full closure by 2038.

Poland, which relies heavily on coal, has been a rare vocal supporter. But last week its energy minister, Krzysztof Tchórzewski, said “increasingly restrictive climate policy” meant the growth of renewables is inevitable.

“In Poland, the development of renewable energy must be supplemented by conventional energy, because it guarantees stable supplies and the energy security of the country,” he said.