President Trump, fulfilling a key campaign pledge, has decided to withdraw from the Paris climate accord, a White House official said on Wednesday – a decision that was quickly condemned by US allies around the world.

But the official said there may be “caveats in the language” that Trump will use when he makes the announcement to open the possibility that the decision isn’t final, the Associated Press reported.

​”I will be announcing my decision on the Paris Accord over the next few days. MAKE AMERICA GREAT AGAIN!,” Trump tweeted on Wednesday.

Later, during an appearance in the White House, Trump was asked about the announcement.

“You’re going to find out very soon,” he said.

The president met with Environmental Protection Agency Administrator Scott Pruitt on Tuesday and he and a small team of advisers are working out the details of when and how the US would step away from the 2015 agreement, the news website Axios reported.

Pruitt and the team are considering either a full, formal withdrawal – a process that could take three years – or clean break.

Asked to confirm that Trump has made up his mind, White House spokesman Sean Spicer said the president is the “ultimate decider.”

​”The president’s comments [that] he’ll be making a decision within the next few days stand,” Spicer said.

The 2015 agreement, brokered by former President Obama, calls for curbing carbon emissions caused by the burning of fossil fuels worldwide and has been signed by 195 countries. If the US withdraws, the decision would align it with Syria and Nicaragua as the only non-participants.

Global reaction was swift and scathing.

China – the largest carbon polluter after the US – along with Spain, India and the European Union reaffirmed their support for the deal after reports surfaced about Trump’s decision.

UN Secretary-General Antonio Guterres, followed up his warning from a day earlier that “it would be very important for the US not to leave the Paris agreement” by saying climate change is a global threat.

“Climate change is undeniable. Climate change is unstoppable. Climate solutions provide opportunities that are unmatchable,” he wrote on Twitter.

Elon Musk, the CEO of Tesla, said he would end his participation with Trump’s special advisory council if the president ends the agreement.

“Will have no choice but to depart councils in that case,” he wrote on Twitter.

Finnish Prime Minister Juha Sipila called it a “big setback” and needled Trump by saying climate change can’t be reversed by “closing your eyes.”

Sweden’s Climate Minister Isabella Lovin, said, “it is also contrary to what we expect from the U.S. leadership when humanity faces major challenges.”

Friends of the Earth, an International environmental organization, said Trump would make America the world’s “foremost climate villain.”

The president, who said during the campaign he would “cancel” the deal in his first 100 days, had been telling confidants over the past week of his intention, a conclusion that was reinforced by a letter he received from 22 Republican senators, including Senate Majority Leader Mitch McConnell, urging him to ditch it.

In the White House, top strategist Steven Bannon and Pruitt encouraged Trump to bail, saying the deal’s regulations were bad for business.

But he was also lobbied by environmental advocacy groups, a number of major corporations – including Microsoft and Apple and energy firms Shell and Exxon Mobil – to stick with the landmark deal. Pope Francis also weighed in in favor.

His daughter Ivanka Trump, Department of Energy Secretary Rick Perry and Secretary of State Rex Tillerson, who used to head Exxon Mobil, said the president should keep a “seat at the table.” Trump was expected to meet with Tillerson on Wednesday.

Republican Sen. Lindsey Graham has said withdrawing “would be taken as a statement that climate change is not a problem, not real.”

The climate pact was a point of contention between Trump and the leaders of the Group of Seven nations last week during their summit in Italy.

The members – Japan, France, Canada, Britain, Germany and Italy – unanimously support the deal and called on Trump to join them.

But the president, who in the past has called climate change a “hoax,” refused to say whether he would remain, leading German Chancellor Angela Merkel to remark: “The whole discussion about climate has been difficult, or rather very unsatisfactory.”

With wires