Editor’s Note: Peter Bergen is CNN’s national security analyst, a vice president at New America and a professor of practice at Arizona State University. His new book is “Trump and His Generals: The Cost of Chaos.” The opinions expressed in this commentary are his own. View more opinion articles at CNN.

CNN  — 

A consistent theme of Donald Trump’s presidency is how the seemingly endless post-9/11 wars in the greater Middle East have wasted trillions of dollars.

Trump believes he was elected, in part, to draw down from these wars – and in the past year he has done just that, both in Afghanistan and in Syria.

Then came Thursday’s air strike, ordered by Trump, that killed arguably the most important commander in the Middle East, the Iranian general, Qasem Soleimani.

As global affairs analyst Max Boot pointed out Friday on CNN, the US has not killed a senior military leader of another country since 1943, when it shot down the plane carrying Admiral Isoroku Yamamoto, the mastermind of Pearl Harbor.

This represents a serious escalation of the long-simmering confrontation between the United States and Iran, since Soleimani was effectively the leader of Iran’s armed forces.

Iran’s Supreme Leader, Ayatollah Ali Khamenei, has vowed to avenge Soleimani’s death.

And given Iran’s proxies across the Middle East – from Lebanon to Iraq, from Syria to Yemen – as well Iran’s substantial military and ballistic missile capabilities, it’s a threat that must be taken seriously.

Indeed, on Friday, the United States urged the evacuation of all US citizens from Iraq immediately.

And Trump now faces what is likely the most significant foreign policy crisis of his presidency – part of which he has created for himself.

To paraphrase Leon Trotsky: You may not be interested in the wars of the Middle East, but those wars are interested in you.

But Trump is not the first American president to learn how difficult it can be to fully extricate the US from the region.

President Jimmy Carter was confronted by the hostage crisis at the US embassy in Tehran that helped contribute to his one-term presidency.

President Ronald Reagan had to pull back from Lebanon after 241 US servicemen were killed in Beirut by a truck bombing in 1983 that was mounted by the Iran-backed Hezbollah militia.

And Reagan’s presidency was nearly derailed by the harebrained Iran-Contra scheme to swap arms with Iran in return for American and European hostages that were held by Hezbollah in Lebanon.

President George H.W. Bush had to respond to Saddam Hussein’s invasion of Kuwait in 1990 that seemed to also threaten neighboring Saudi Arabia by sending hundreds of thousands of American soldiers to expel Saddam from Kuwait.

Bill Clinton’s presidency saw the rise of al Qaeda. On Clinton’s watch, the terrorist group bombed two US embassies in Africa, killing more than two hundred people in 1998.

Two years later, the group attacked the USS Cole in Yemen, killing 17 American sailors.

9/11 was one of the hinge events of American history. As a result, President George W. Bush launched a war in Afghanistan against al Qaeda and the Taliban – and also a war of choice two years later in Iraq.

President Barack Obama dramatically increased the covert CIA drone campaign targeting al Qaeda in Pakistan and in Yemen.

Obama also oversaw the withdrawal of US troops from Iraq in 2011. Three years later, after ISIS was almost at the gates of Baghdad, Obama sent thousands of American troops back into Iraq to combat the terrorist army.

Trump’s natural inclination is to get out of the Middle East, but just like every other American president over the past four decades, he is now being pulled back in. Indeed, Trump himself has contributed to this crisis by pulling out of the Iran nuclear deal.

On October 3, 2017, Trump’s then-Secretary of Defense Jim Mattis testified before the Senate Armed Services Committee that Iran was adhering to the nuclear agreement. When Sen. Angus King, an independent, asked Mattis whether he believed the deal was in US national security interests, Mattis replied, “Yes, Senator, I do.”

But Trump had asserted for the past two years that the Iran agreement was the “worst deal ever,” and so in 2018 he pulled out of the deal. He also added new sanctions that have devastated the Iranian economy and contributed to widespread street protests against the regime.

Iran announced in July that it was breaching the terms of the nuclear deal by enriching uranium beyond the 3.67% purity allowed by the agreement, enriching it above 4.5%.

This was still a very long way from the 90% purity that would be needed for a nuclear weapon, but it was a small step down the road to reactivating Iran’s nuclear weapons program – the program that Trump had repeatedly said he would never allow.

Get our weekly newsletter

  • Sign up for CNN Opinion’s new newsletter.
  • Join us on Twitter and Facebook

    Since June, Iran has been punching back in other ways, bringing down an unmanned US surveillance drone and allegedly attacking some of the world’s most important oil facilities in Saudi Arabia (an attack it denies carrying out), while Iran-backed militias have also attacked American bases in Iraq.

    Now the United States and Iran stand on the brink of a war that neither side really wants, but Iran likely feels it must respond in a meaningful way to the killing of Soleimani.

    As a result, both sides may go up the “escalatory ladder” to a wider conflict.