Trump is alienating America's longest-standing allies and also endangering the world — just so he can have revenge on President Obama.

Trump is pulling the United States out of the Iran nuclear deal, a decision which will further alienate the United States from its closest and longest-standing international allies.

The New York Times reports that Trump’s obsession with undoing the presidency of Barack Obama has led him to this point in his tenure, noting that Trump’s petulant action “lunges America’s relations with European allies into deep uncertainty.”

Apparently since they do not have ongoing envy and obsession with Obama, the other European nations who are a part of the deal will stay in it.

Trump also hands Iran “a propaganda win” by pulling out of the deal, giving Iran the upper hand over the United States while also allowing them to move toward creating a nuclear arsenal.

The Times notes that if Trump reimposes sanctions on Iran, it could cause those allies to be engaged in a “diplomatic and economic clash” with the United States.

Reigniting those sanctions will also lead to higher gas prices for average Americans, but Trump believes undoing a large part of Obama’s legacy is worth it.

U.K. foreign secretary Boris Johnson, acting on orders from prime minister Theresa May, recently appeared on Fox News and made a direct appeal to Trump not to “throw the baby out with the bathwater” and stick with the deal.

Johnson also wrote an op-ed in the New York Times begging Trump to stay with the deal.

French president Emmanuel Macron said withdrawing from the deal “would mean opening Pandora’s box, it could mean war.”

German chancellor Angela Merkel has also pushed for the Iran deal to be kept in place.

Hundreds of European lawmakers have written to Trump, noting in a joint document “We were able to impose unprecedented scrutiny on the Iranian nuclear program, dismantle most of their nuclear enrichment facilities, and drastically diminish the danger of a nuclear arms race.”

They have been pushing for him to keep the deal to preserve international security.

Former Israeli leader Ehud Barak, who has often been hawkish toward Iran, said it would be a “mistake” to drop out of the deal and would hurt negotiations with North Korea, who has continued to pursue nuclear weapons.

But Trump has been tearing America away from its allies and toward authoritarian regimes more in line with his own world view.

He praised authoritarians like Philippines President Rodrigo Duterte, while calling Germany “evil, very evil.”

While the rest of the world committed to the Paris climate accords, Trump took America out, which generated international criticism and condemnation from citizens and leaders.

Approval of American leadership has plummeted under Trump, as he takes the country away from its traditional role toward a more isolationist approach.

The Iran deal was put in place to help international peace. It sought to keep nuclear weapons away from the ever-volatile cauldron of Middle Eastern politics.

World leaders understood the importance of doing so and were led by President Barack Obama to the historic agreement.

Now, simply because his failing presidency has none of the support Obama experienced, Trump is again upending the apple cart, even if that means condemning the world to war and turning away allies that have been with America since it was founded.