The last man standing between the U.S. and war with Iran may be a four-star general affectionately known to his Marines as “Mad Dog.”

Gen. James Mattis, the secretary of defense, appears to be the last man in the Situation Room who believes the Iran nuclear deal may be worth preserving and that war with Iran is a dreadful idea.

Yet, other than Mattis, President Donald Trump seems to be creating a war cabinet.

Trump himself has pledged to walk away from the Iran nuclear deal — “the worst deal ever” — and reimpose sanctions in May.

His new national security adviser John Bolton, who wrote an op-ed titled “To Stop Iran’s Bomb, Bomb Iran,” has called for pre-emptive strikes and “regime change.”

Secretary of State-designate Mike Pompeo calls Iran “a thuggish police state,” a “despotic theocracy,” and “the vanguard of a pernicious empire that is expanding its power and influence across the Middle East.”

Yet Iran appears not to want a war. U.N. inspectors routinely confirm that Iran is strictly abiding by the terms of the nuclear deal.

While U.S. warships in the Persian Gulf often encountered Iranian “fast attack” boats and drones between January 2016 and August 2017, that has stopped. Vessels of both nations have operated virtually without incident.

What would be the result of Trump’s trashing of the nuclear deal?

First would be the isolation of the United States.

China and Russia would not abrogate the deal but would welcome Iran into their camp. England, France and Germany would have to choose between the deal and the U.S.

How would North Korea react if the U.S. trashed a deal where Iran, after accepting severe restrictions on its nuclear program and allowing intrusive inspections, were cheated of the benefits the Americans promised?

Why would Pyongyang, having seen us attack Iraq, which had no WMD, and Libya, which had given up its WMD to mollify us, ever consider given up its nuclear weapons — especially after seeing the leaders of both nations executed?

And, should the five other signatories to the Iran deal continue with it despite us, and Iran agree to abide by its terms, what do we do then?

A war, which would involve U.S. warships against swarms of Iranian torpedo boats could shut down the Persian Gulf to oil traffic and produce a crisis in the global economy. Anti-American Shiite jihadists in Beirut, Baghdad and Bahrain could attack U.S. civilian and military personnel.

As the Army and Marine Corps do not have the troops to invade and occupy Iran, would we have to reinstate the draft?

And if we decided to blockade and bomb Iran, we would have to take out all its anti-ship missiles, submarines, navy, air force, ballistic missiles and air defense system.

Trump was nominated because he promised to keep us out of stupid wars like those into which folks like John Bolton and the Bush Republicans plunged us.

After 17 years, we are still mired in Afghanistan, trying to keep the Taliban we overthrew in 2001 from returning to Kabul. Following our 2003 invasion, Iraq, once a bulwark against Iran, became a Shiite ally of Iran.

What is Trump thinking? Truman and LBJ got us into wars they could not end, and both lost their presidencies. Eisenhower and Nixon ended those wars and were rewarded with landslides.

After his smashing victory in Desert Storm, Bush I was denied a second term. After invading Iraq, Bush II lost both houses of Congress in 2006, and his party lost the presidency in 2008 to the antiwar Barack Obama.

Once Trump seemed to understand this history.