President Trump announced steps to exit from the Paris climate change agreement on Thursday amid growing international opposition and accusations by Democrats that the U.S. is abdicating its leadership position on clean energy and global warming to China.

"I am fighting every day for the great people of this country. Therefore, in order to fulfill my solemn duty to protect America and its citizens, the United States will withdraw from the Paris climate accord," Trump said.

The move to leave the international deal will take four years to complete.

In that time, Trump said he will "begin negotiating to re-enter either the Paris accord, or an entirely new transaction on terms that are fair to the United States, its businesses, its people, its taxpayers." He said "we're getting out" while beginning these negotiations. Trump said he if America can get a better deal that is fine, but if not, that is also fine with him.

Repeatedly calling the agreement "unfair" to the U.S., Trump singled out China and India as having much less restrictive terms under the deal.

The decision makes good on one of Trump's top campaign promises to cancel U.S. involvement in the United Nations climate agreement that former President Barack Obama entered into with 196 other countries in December 2015. Reaching the agreement was the cornerstone of Obama's climate agenda and legacy.

Trump's action is seen by conservatives as a major step in rolling back Obama's environmental policies and promoting Trump's pro-growth America First agenda. Indeed, Trump said several times during the speech that the withdrawal from the deal was putting "America first."

The Paris deal, although non-binding, would have helped provide the legal basis for keeping in place a number of climate regulations pushed through during Obama's tenure, including the Clean Power Plan.

Many of the regulations that the Paris deal would help support President Trump is revising, rescinding or repealing. Republican congressional leaders as well as Republican state attorneys general say not withdrawing from the deal it would pose a "litigation risk" to Trump's deregulation agenda and upset the administration's goals.

Republicans also argue that the Paris deal is unfair to the U.S. by making it easier for China to phase in emission cuts over a longer period, while the U.S. would have to begin emission cuts and curb fossil fuel use almost immediately. Many climate scientists blame greenhouse gases emitted from burning fossil fuels for driving manmade climate change.

Trump and the GOP also oppose the creation of a $100 billion-per-year Green Climate Fund under the Paris deal. Obama sent two tranches of $500 million to the fund in 2016 and right before Trump was inaugurated. The funds would be used to help small, developing nations cope with the effects of global warming.

Under the Paris deal, the amount of money the U.S. and other developed nations contribute is set to grow over the next three years until the total amount reaches $100 billion by 2020. But many nations are recommending that the contribution be increased much higher. Trump opposed the green fund's proposed wealth transfer during the campaign.

The only two countries that didn't sign onto the Paris Agreement are Syria and Nicaragua.

Critics of Trump's withdrawal, such as House Minority Leader Nancy Pelosi, D-Calif., say his decision will ruin the U.S.'s standing in the rest of the world, while giving newfound clout to non-Democratic actors such as China.

Ahead of Trump's formal announcement, Pelosi called the decision a "stunning abdication" of U.S. leadership and a great threat to health of the planet.

"We shouldn't be joining Syria and Nicaragua as the only three countries in the United Nations to oppose this historic progress," Pelosi said. "We can't turn back now. We must speak out and make our voices heard."

Not only Democrats are opposed to Trump's withdrawal. Sen. John McCain, the outspoken Republican from Arizona, also opposes the move.

"I would like to see us ... either accept the agreements as were made by the Obama administration or suggest modifications which would make it palatable for us and acceptable to us to join," McCain said earlier this week while in Australia, where he called the loss of much of the Great Barrier Reef's coral a tragedy that must be addressed.

"If we don't address this issue, I am very much afraid about what the world is going to look like for our children and grandchildren," he said. McCain was a co-sponsor of climate change legislation introduced in 2003, which would have set up a cap-and-trade program to cut greenhouse gas emissions. He later ran a campaign for president against then Sen. Barack Obama, where he supported drilling in the Arctic.

Climate activists and environmental groups see Trump's action as ignoring the market changes that are occurring toward cleaner forms of energy and want the U.S. to lead the way toward a 100 percent renewable energy future.

Large energy companies such as oil and coal giants Exxon Mobil and Peabody Energy also urged Trump to remain a part of the Paris deal. The climate agreement is seen by some of the largest coal companies in the world as beneficial to increase coal use worldwide through the development of carbon capture and more efficient power plant technologies. Companies like Peabody see countries such as China and India using more coal in the future and want the U.S. to assist them in developing the technologies to assist in their electricity growth.

Exxon Mobil sees natural gas power plant development also growing, and supports advanced technology to make gas-fired power plants cleaner. The U.S.'s switch from coal to more natural gas-fired electricity has resulted in a 25-year low in the nation's greenhouse gas emissions, along with increasing use of solar and wind. However, with more solar and wind coming online, fossil fuel power plants are needed to back up those resources. Therefore, even in a carbon-constrained world, fossil fuel use is expected to grow.