Poland, Europe’s biggest exporter and second-biggest consumer of coal, is cautiously embracing renewables to improve the security of its energy supply and meet European Union targets.

At the end of last month, the country’s upper house of parliament approved the removal of clean power investment roadblocks within a new renewable energy law aimed at putting Poland back on track to meet its EU commitment of 15 percent renewables by 2020.

The country had strayed from its target after Law and Justice (Prawo i Sprawiedliwość or PiS in Polish), a national conservative party, gained power in 2015 with pledges to support the coal industry, Euractiv reported. The following year, the party turned sour on onshore wind.

Poland had been the second-largest wind market in Europe during 2015, but investment fell off a cliff in 2016 when lawmakers quadrupled taxes on turbines, made it illegal to build plants within 1.2 miles of buildings or forests and imposed draconian inspection measures.

By October 2017, the U.S. developer Invenergy, which had installed 5 percent of Poland’s wind capacity at a cost of more than $600 million, was accusing the Polish government of actions “tantamount to an expropriation” and seeking $700 million in damages, Bloomberg reported.

This year’s change came partly in response to criticisms from other EU members, 11 of which have already met the 2020 renewable energy goals set in 2008. But a desire to improve security of supply also likely weighed heavily in the decision.

In February, Polish energy official Piotr Naimski said a move to snub Russia with a gas import link to Norway was “a question of security.”

Poland has been buying gas from Moscow since 1944. It imported 63 percent of its supplies from Russia last year, but the PiS has said it will not renew a contract with Gazprom in 2020. The gas pipeline to Norway is scheduled to come online in 2022.

Meanwhile, Poland’s new renewable-friendly stance has prompted an uptick in interest from investors.

Last month, for example, Sun Investment Group announced plans to install 250 megawatts of solar power in the country, which it said represented 15 percent of Poland’s PV market.

The projects, worth €40 million ($47 million), were awarded in public auctions and come with a 15-year contract for difference. They will be built by energy group E-Energija and PV construction firm I+D Energias.

Andrius Terskovas, head of business development at Sun Investment Group, said public opinion favors increasing renewables penetration.

“Fewer than two-fifths of the respondents see the chances of ensuring energy security for Poland in the use of crude oil, and even fewer people choose coal in this context,” he said, referencing research from 2016.

The scene is now set for growth in renewables across Poland, with biomass, solar and offshore wind likely taking most new generation capacity. But it will be some time before the country shrugs off its coal addiction.

International Energy Agency figures show coal accounting for 80 percent of the country’s 166 terawatt-hours of electricity generation in 2016. Renewables made up 14 percent of the mix, compared to an average of 30 percent across the E.U.

Today Poland remains the 10th-largest coal consumer in the world, and the second largest in Europe, after Germany.

“According to the official Polish Government Energy Policy Strategy, coal will remain the key element of the country’s energy security until at least 2030,” according to the World Energy Council.

And for all the optimism offered by recent events, Tom Heggarty, a Wood Mackenzie senior analyst for global solar PV, said the market remained a challenging one for solar developers.

“To date, only projects of up to 1 megawatt in size have been auctioned, so there's a lot of development work required to achieve any meaningful scale in the market,” he said.

“The government and regulator have been talking for a while about 1-megawatt-plus auctions that will be open to both onshore wind and PV, but it is by no means a given that solar will win a large volume of capacity through those, as onshore wind looks pretty competitive in Poland.”