WASHINGTON — President Donald Trump declared Thursday he was withdrawing the U.S. from the landmark Paris climate agreement, striking a major blow to worldwide efforts to combat climate change and distancing the country from many allies abroad. He said the U.S. would try to re-enter but only if it can get more favorable terms.

Framing his decision as “a reassertion of America’s sovereignty,” he said, “I was elected to represent the citizens of Pittsburgh, not Paris.”

Ending weeks of speculation, some of it fueled by Trump himself and his Cabinet members, he said, “As of today, the United States will cease all implementation of the nonbinding Paris accord.”

Under former President Barack Obama, the U.S. had agreed under the accord to reduce polluting emissions by about 1.6 billion tons by 2025. But the targets were voluntary, meaning the U.S. and the nearly 200 other nations in the agreement could alter their commitments.

Trump said that he would begin negotiations to re-enter the agreement or establish “an entirely new transaction” to get a better deal for the U.S. Trump said that he would begin negotiations to re-enter the agreement or establish “an entirely new transaction” to get a better deal for the U.S. But he suggested re-entry was hardly a priority. “If we can, great. If we can’t, that’s fine,” he said.

By abandoning the world’s chief effort to slow the tide of planetary warming, Trump was fulfilling a top campaign pledge. But he was also breaking from many of America’s staunchest allies, who have expressed alarm about the decision. Several of his top aides have opposed the action, too, as has his daughter and adviser, Ivanka Trump.

Scientists say Earth is likely to reach more dangerous levels of warming sooner as a result of the president’s decision because America contributes so much to rising temperatures. Calculations suggest withdrawal could result in emissions of up to 3 billion tons of additional carbon dioxide in the air a year — enough to melt ice sheets faster, raise seas higher and trigger more extreme weather.

Trump’s decision marked “a sad day for the global community,” said Miguel Arias Canete, climate action commissioner for the European Union. German Chancellor Angela Merkel. …

WH handout on Paris announcement pic.twitter.com/QKk5mASEqY — Zeke Miller (@ZekeJMiller) June 1, 2017

At home in America, the U.S. Conference of Mayors said it strongly opposed the decision and said mayors will continue efforts to reduce greenhouse gas emissions blamed for global warming. The group’s vice president, New Orleans Mayor Mitch Landrieu said the action “is shortsighted and will be devastating to Americans in the long run.” In fact, he said, sea level rise caused by unchecked climate change could mean that cities like his “will cease to exist.”

Trump, however, argued the agreement had disadvantaged the U.S. “to the exclusive benefit of other countries,” leaving American businesses and taxpayers to absorb the cost.

“This agreement is less about the climate and more about other countries gaining a financial advantage over the United States,” he said, claiming that other countries have laughed at the U.S. for agreeing to the terms.”

As Trump announced his plans, it was 83 degrees Fahrenheit (28 Celsius) in Washington, a bit higher than the 80-degree average high for the day but well below the 2011 record of 98. Business investors seemed pleased, with stock prices, already up for the day, bumping higher as he spoke. The Dow Jones industrial average rising 135 points for the day.

As for the mechanics of withdrawal, international treaties have a four-year cooling off period from the time they go into effect. That means it could take another three-and-half years for the U.S. to formally withdraw, though Trump promised to stop implementation immediately.

Major U.S. allies, business leaders and even the Pope had urged the U.S. to remain in the deal. The decision drew immediately backlash from climate activists and many business leaders.

The U.S. is the world’s second-largest emitter of carbon, following only China. Beijing, however, has reaffirmed its commitment to meeting its targets under the Paris accord, recently canceling construction of about 100 coal-fired power plants and investing billions in massive wind and solar projects.

White House aides have been divided on the question of staying or leaving the accord and had been deliberating on “caveats in the language” as late as Wednesday, one official said. But Trump’s statement was clear and direct.

So was opposition from environmental groups, as expected.

“Generations from now, Americans will look back at Donald Trump’s decision to leave the Paris Agreement as one of the most ignorant and dangerous actions ever taken by any President,” Sierra Club executive director Michael Brune said in a statement.

___

Associated Press writers Julie Pace and Jill Colvin wrote this report. Associated Press writers Ken Thomas, Erica Werner, Vivian Salama, Michael Biesecker and Seth Borenstein in Washington contributed to this report.