– As President Donald Trump contemplates withdrawing from a landmark agreement on global warming, Premier Li Keqiang of China said Thursday that his country remained committed to the fight against climate change and to participating in international efforts for a greener world.

"China will continue to uphold its commitments to the Paris climate agreement," Li said, confirming a position his country agreed to alongside the United States in 2014, in what proved to be a watershed moment for the ultimate passage of the landmark accord the following year.

"Step by step, and very arduously, together with other countries, we will work toward the goals set" by global leaders in 2015, Li said, standing beside Chancellor Angela Merkel of Germany in Berlin.

Merkel, who welcomed the Chinese commitment as "encouraging," has been a leader in the global push for climate action since 1992, when she played a crucial international role in passage of the world's first climate treaty, the Kyoto Protocol.

The German leader pointed to future cooperation between the Brussels and Beijing, making clear the similar intention in Europe to move ahead with potential partners to fill any vacuum created by Washington's absence.

"China actively participated in this process in the past years and joined or signed every agreement concerning this," Li said.

"We say in China, 'Our words count, and our actions must be successful,' and China will uphold its responsibility" to protect the climate, Li said, adding that Beijing was closely following "international developments" on the issue. He did not directly mention Trump or reports of the discussions in Washington.

After Berlin, Li will head to Brussels for a summit meeting with European Union leaders. They are expected to announce a number of measures deepening joint cooperation on climate protection.

"The E.U. and China recognize the importance of developing global free trade and investment, and promoting the multilateral rule-based system to allow the full development of the low greenhouse gas emission economy with all its benefits," reads the text of a joint statement on climate change and clean energy that the Europeans and Chinese are expected to announce Friday.

In a message apparently aimed directly at Trump, the Europeans and the Chinese were also expected to "call on all parties to uphold the Paris Agreement" and "to strengthen efforts over time, in accordance with the purpose and provisions of the agreement," according to the statement, which was seen Wednesday night by the New York Times.

Climate change, the Chinese and the Europeans were expected to warn, has "detrimental impacts on water, food and national security," and those factors "have become a multiplying factor of social and political fragility, and constitute a root cause for instability, including the displacement of people."

Hua Chunying, a spokeswoman for the Chinese Ministry of Foreign Affairs, reinforced the warning. "Climate change is a global challenge and there is no country that can stay aloof," Hua said at a regular news briefing in response to a question about a possible U.S. withdrawal. "The Paris accord was a hard-won outcome and it distilled the broadest consensus of international society."

In Moscow, a spokesman for President Vladimir Putin of Russia expressed a similar sentiment. The spokesman, Dmitry Peskov, said that Russia "thinks highly" of the Paris Agreement, the Associated Press reported, adding that there was no viable alternative and that putting it in place effectively would depend on "the key signatories."

China, the world's biggest emitter of carbon dioxide, stands to gain international credit for standing by the Paris Agreement, but it would not be able to fill the void on its own if the United States abandoned the treaty.

The leadership in Beijing would turn to Europe and to other developing countries to strengthen cooperation in cutting greenhouse gas pollution and preparing to cope with a hotter planet, said two experts who have advised the Chinese government.

If the United States does withdraw, "the system of global climate governance won't totally collapse, but it will be shaken," said Zhang Haibin, a professor at Peking University who studies international environmental politics.

"The international community may expect China to play a leading role," he said. "But in my view, China doesn't have the capacity to single-handedly play the role of global hero. Instead, we'll need to work closely with the European Union and the Basic countries," he said, referring to a negotiating bloc that includes Brazil, South Africa, India and China.

"Collective leadership will be more important," he said.

In the months before Trump's announcement, Chinese officials repeatedly urged the United States to stay in the climate treaty. The Paris accord came together in 2015 after years of fractious negotiations and a near breakdown of talks in Copenhagen, Denmark, in 2009 that left bitterness between Chinese leaders and the Obama administration.

Over the past decade, Chinese leaders have placed a higher priority on reining in pollution after decades of galloping industrial growth. China's unwelcome status as by far the world's biggest greenhouse gas emitter, as well as public anger over smog, has pushed the government to cut pollution from fossil fuels as a slowdown in industry helped cut demand for coal.

In 2016, China released about 10.4 billion metric tons of carbon dioxide from fossil fuels and industry, a decline of 0.7 percent compared with 2015, according to the Global Carbon Budget, an international research consortium. The United States emitted 5.4 billion tons, but measured per person, its emissions are much higher. Initial measurements suggest that China's total emissions dipped again last year.

Last week, China's president, Xi Jinping, held a meeting of senior Communist Party officials to find ways to reconcile climate change and economic growth.

"Our country's economic and social development has achieved historic successes," Xi said at the meeting, according to an official account. "At the same time, our rapid growth has led to the accumulation of a great many environmental problems, and that's become a clear weak point, and an acute problem leading to intense public complaints."

Formally abandoning the Paris accord would probably take the United States three or four years, giving other governments some time to regroup, said Zou Ji, a professor of environmental policy at Renmin University in Beijing, who has advised the Chinese government on climate change policy and negotiations.

"China, the European Union, India and other major powers will still be there, and they'll form a new leadership array," Zou said. "Given its national strength and status as a developing country, and its traditional foreign policy, it will be very difficult for China to step forward and say, 'I'm the leader.' But China can't deny that it will have a leading role."