UNITED NATIONS—U.K. Prime Minister Theresa May said the Paris climate agreement is a key part of promoting global security and prosperity in what appeared to be a rebuke of President Donald Trump’s pledge to leave the accord.

Mrs. May, in her remarks to the United Nations General Assembly on Wednesday, said global commitment to a rules-based system is critical as nations face threats such as North Korea’s pursuit of a nuclear weapons programs and Syrian President Bashar al-Assad’s use of chemical weapons against his own people.

“It is this rules-based system which we have developed, including the institutions, the international frameworks of free and fair trade, agreements such as the Paris Climate Change accord and laws and conventions like the Non-Proliferation Treaty, which enables the global cooperation through which we can protect those values,” she said.

The Trump administration had sent signals over the weekend that it was exploring ways to remain in the 2015 pact, but the White House said Monday that the U.S. will leave the deal “unless we can re-engage on terms more favorable to the United States.”

In her address to the U.N. on Wednesday, Mrs. May said that the U.K. is committed to being a global player but didn’t specifically mention its planned exit from the European Union.