In a heavily-teased event at the White House Rose Garden, President Donald Trump announced Thursday that the United States will withdraw from the landmark Paris climate agreement.

The decision will set the world's largest economy apart from almost all other nations on earth and moves in opposition to many large American companies, as well.

Former President Barack Obama said withdrawing from climate accord will mean a loss of new jobs and industries.

Trump and many of his allies have long dubbed the Paris Agreement a "bad deal" for America. They say it forces the United States to make immediate sacrifices that will hurt the economy, while other countries such as China are allowed to put off action until later.

Trump recently faced pressure from many large American companies and allies abroad, who back the landmark global deal to curb emissions. He promised to back out of the agreement as a candidate, but White House advisors recently suggested that his views on climate change were evolving.

More than two decades of climate diplomacy produced the Paris Agreement in December 2015. The accord requires the 195 signatories — nearly every country in the world — to create national plans to reduce their greenhouse gas emissions in a bid to mitigate the effects of climate change.

Syria and Nicaragua are the only countries in the U.N. group that are not signatories.

The treaty aims to prevent global temperatures from rising by more than 2 degrees Celsius above pre-industrial levels.

— CNBC's Tom DiChristopher contributed to this report