MADRID — Opposition from Europe's most coal-reliant country complicated the continent's efforts on Friday to eliminate its carbon footprint by 2050, but leaders said they would go ahead with the plan even as Poland opted out.

After into-the-night negotiations in Brussels, European Union leaders signed off on the pledge, which is one of the most ambitious emissions-reductions targets to date. But the final text singled out one “member state” as being unwilling to commit. European leaders said they would resume efforts to bring Poland on board at a summit next year.

The conclusion was hailed by environmental advocates, who say that the world’s largest emitters must rapidly curtail their fossil fuel reliance to stave off a deeper climate change catastrophe.

But the divisions within Europe also show the wider difficulties facing world leaders as they try to pursue major climate change targets with a unified front. Countries reliant on fossil fuels have been reluctant to consider cutbacks that they worry would force difficult economic changes.

Europe is trying to offset the pain of those changes in what is known as the Green Deal, a sweeping package of ideas to fight climate change while helping countries to significantly refashion their economies. One aspect of the plan calls for a fund that would send billions of euros to countries that are the most reliant on fossil fuels, including Poland, Hungary and the Czech Republic. According to Reuters, Poland has demanded certain guarantees about the scale of the financing. Other Eastern European countries signed on to the net-zero 2050 target after securing the right to invest in nuclear energy.

“We need to be ambitious if we want to attain our long-term goals,” Frans Timmermans, the former vice president of the European Commission, said at a news conference in Madrid, where more than 190 countries are meeting for an annual climate change conference.

Timmermans called the E.U. decision an “important step” and one “that I hope will be followed by many of our partners across the world. But you can only get there if you start now. We can’t lose sight of the fact that we need to act now, if we want ultimately to be there in 2050. And acting now is creating and implementing concrete plans and concrete steps.”

Roughly 80 nations have pledged to do more to cut their emissions beginning in 2020, but most of those countries are fairly small — making Europe’s target significant, experts said on Friday. The Intergovernmental Panel on Climate Change says that to limit the increase of global temperatures to 1.5 degrees Celsius — the most ambitious target of the Paris agreement — the world will need to reach carbon neutrality by 2050.

Based on the world’s current pledges, global temperatures are forecast to rise well above that threshold, putting pressure on countries to quickly do more.

Helen Mountford, the vice president of climate and economics at the World Resources Institute, said it was a “shame” that Poland had resisted signing on.

“But it’s better that Europe still went ahead with endorsing the message,” Mountford said. “That is a better outcome and it still sends a very strong message from Europe.”

About 80 percent of Poland’s power comes from coal-fired plants, the highest total in Europe, and some 100,000 people work in Poland’s coal mines. When the Polish city of Katowice last year hosted the global climate change conference, Poland showed off lumps of coal and touted its “clean coal” technology. Polish President Andrzej Duda said last year that Poland had enough coal to last for two centuries, and it “would be difficult for us to give up coal — thanks to which we have energy sovereignty.”

But some experts say that Poland’s stock of coal is much smaller, and they note that the country’s coal industry has been beset by corruption. Coal waste is so problematic that some towns have sued the government. In 2018, Poland had announced a plan to be 50-percent reliant on coal by 2050.

Brady Dennis in Madrid contributed to this report.