WARSAW, Poland (AP) — The government of Poland, a country heavily reliant on coal, initialed an agreement with the coal mining industry Wednesday to phase out coal production by 2049.

The deal, which has been under negotiation for months, marks the first time that the powerful coal mining sector in Poland has agreed to end its own existence.

The plan includes subsidies that would soften the blow on the miners. The subsidies, which would represent a large burden on the state budget, also could possibly be in violation of European Union regulations for subsidies to dying industries.

Government and union representatives initialed the agreement on Wednesday in Katowice, a city in the coal-mining heartland of Silesia, in southern Poland, the state news agency PAP reported. The action clears the way for the plan to go to the European Commission, the executive arm of the European Union, for approval. The final signing is expected in May.

Many analysts say that continuing to produce coal until 2049 is far too long given the high environmental cost of burning coal and with economic momentum moving toward renewable energy sources.

“It will be impossible to keep hard coal mining for so long,” said Marta Anczewska, an energy policy officer with environmental organization WWF in Warsaw. “This schedule will change because of the economic and climate conditions.”

The coal sector is in steep decline in much of the world as renewable and other energy sources come down in price and societies increasingly reject the damaging impact on climate change of burning fossil fuels .

That is also the case for Poland, even though the central European nation still relies on coal for 70% of its electricity generation and is failing to meet emission-reduction milestones as the EU aims to become carbon neutral by 2050.

Demand for coal has been falling as wind and other renewables have become cheaper and as the cost of carbon emissions goes up. Poland's own coal has become increasingly uncompetitive, often piling up unused as the country imports cheaper coal from Russia and other countries.

Polish society is also becoming less willing to accept having some of the worst air pollution in Europe. Even coronavirus outbreaks among miners have weighed on the industry.

Under the deal, the government will phase out coal over the next 28 years.

In exchange, miners will get the right to relocate from closed mines to ones still operating, or get early retirements at 80% of their salaries. Those who choose to leave mining will qualify for a severance payment of 120,000 zlotys ($32,000). The agreement also provides for an investment of over 16 billion zlotys ($4.2 billion) in clean coal technologies.

“The agreement is generous for miners and the coal intensive region of Silesia, expensive for the state budget, and sluggish in terms of climate policy ambitions,” said Jan Frankowski, an analyst at the Institute for Structural Research, an independent research foundation in Warsaw. “A question remains if these terms are acceptable by the European Commission, responsible for the ratification of the agreement."

Lawmakers with the centrist Civic Platform opposition party criticized the deal and accused the government of failing to come up with a sufficiently ambitious plan for creating new job opportunities to replace the liquidated mines.

Wojciech Saluga, a lawmaker from Silesia, said the ruling conservative party has solved none of the region's long-term problems but “buys social peace in Silesia" and "protects itself against protests and strikes.”