“The transformation envisaged in the Paris Agreement is already underway,” he said in a statement. “The Secretary-General remains confident that cities, states and businesses within the United States — along with other countries — will continue to demonstrate vision and leadership by working for the low-carbon, resilient economic growth that will create quality jobs and markets for 21st century prosperity.”

Victoria Tauli-Corpuz, the United Nations special envoy for indigenous people, said Mr. Trump’s decision would punish those who were least to blame and the most vulnerable.

“We are already seeing climate change destroy lives, livelihoods and entire communities,” she said in an email. “While indigenous peoples are often the first to feel these effects because of where we live, the entire planet will suffer as a result of history’s largest emitter retreating on climate change.”

Before the announcement, United Nations envoys from rich and poor countries alike said they were sticking to the agreement, with or without the United States. New diplomatic alliances were forming, with Europe, India and China pledging to uphold their end of the deal.

Premier Li Keqiang of China, in Berlin for meetings with Chancellor Angela Merkel, said Thursday that his country remained committed to the fight against climate change and to participating in international efforts for a greener world.

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.

“China will continue to uphold its commitments to the Paris climate agreement,” Mr. 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 passage of the landmark accord the following year.