Barack Obama led condemnation of his successor’s decision to withdraw from the landmark Paris climate accord, which the former president’s administration painstakingly negotiated over the course of several years.

In a statement released just before Donald Trump officially announced that the US would remove itself from the deal, Obama said the administration had joined “a small handful of nations that reject the future”. He warned that the more than 190 countries that remained participants would “reap the benefits in jobs and industries created”, but he said that US states, cities and businesses “will step up and do even more to lead the way, and help protect for future generations the one planet we’ve got”.

The rare rebuke by Obama was testament to the magnitude of Trump’s decision. The former president has commented sparingly on the new administration, weighing in only on matters he has framed as of moral significance, such as Trump’s stymied effort to impose a travel ban on refugees and citizens from several Muslim-majority countries.

Trump’s withdrawal from the accord was not just a blow to one of Obama’s signature achievements, but to an issue routinely dubbed by the Obama administration as the greatest threat to US national security and future generations across the globe.

The former secretary of state John Kerry, who represented the US in the negotiations over the Paris accord, said Trump had turned America into “an environmental pariah in the world”.

In exiting the agreement, the US joined only Syria and Nicaragua in sitting on the sidelines even as widespread condemnation poured in from foreign leaders, climate scientists and many leading US companies.

The reaction in Washington was nonetheless split on familiar partisan lines, with Republican lawmakers near unanimously throwing their support behind Trump while Democrats vowed revenge at the ballot box.

Republican leaders Paul Ryan and Mitch McConnell, who have long sought to thwart Obama’s environmental legacy, applauded Trump in their statements.

“The Paris climate agreement was simply a raw deal for America,” Ryan said, adding: “In order to unleash the power of the American economy, our government must encourage production of American energy. I commend President Trump for fulfilling his commitment to the American people and withdrawing from this bad deal.”

McConnell said Trump’s move followed through on congressional action “to rebuff then-President Obama’s regulatory rampage.”

“When the previous administration signed America up for this unattainable mandate, we made it clear we would fight this unilateral action any way we could, and this day could not have happened soon enough,” McConnell said. “President Trump has once again put families and jobs ahead of leftwing ideology and should be commended for his action.”

But at least two Republicans – from Florida, one of many coastal states grappling with the effects of extreme weather and rising sea levels – expressed disappointment with the president’s decision to withdraw.

“Something’s not right when Potus is putting our country on a list with bad hombres Bashar al-Assad of Syria and Daniel Ortega of Nicaragua,” congressman Carlos Curbelo, of south Florida, wrote on Twitter.

Congresswoman Ileana Ros-Lehtinen, who represents south Florida, urged the US to establish a “long term-strategy against climate change”. She also noted that Thursday marked the the first day of hurricane season in the state.

Democrats were uniformly scathing in their assessment of Trump’s decision, with Senate minority leader Chuck Schumer declaring it “a devastating failure of historic proportions”.

“Future generations will look back on President Trump’s decision as one of the worst policy moves made in the 21st century because of the huge damage to our economy, our environment and our geopolitical standing,” Schumer said. “Pulling out of the Paris agreement doesn’t put America first. It puts America last in recognizing science, in being a world leader and protecting our own shore line, our economy and our planet.”

Nancy Pelosi, the House Democratic leader, said Trump’s position ran counter to that of Pope Francis, who during the president’s recent visit to the Vatican presented Trump with a copy of his encyclical on climate change.

Democrats would join efforts with states, cities and the private sector to make good on initiatives to mitigate the threat of climate change, she added, “regardless of the reckless and short-sighted actions that the White House takes”.

Bernie Sanders, the Vermont senator who made climate change a pillar of his bid for the 2016 Democratic presidential nomination, decried Trump’s action as “an abdication of American leadership and an international disgrace”.

“When climate change is already causing devastating harm, we don’t have the moral right to turn our backs on efforts to preserve this planet,” Sanders tweeted.

At least one senator, Chris Murphy, a Democrat from Connecticut, appeared to be at a loss for words.

“Dear planet, we’re sorry,” Murphy tweeted. “Please just hang on for three and a half more years and we’ll fix this. We promise.”