President Donald Trump speaks at a hanger rally at Al Asad Air Base, Iraq, Wednesday, Dec. 26, 2018. President Donald Trump, who is visiting Iraq, says he has 'no plans at all' to remove US troops from the country. (AP Photo/Andrew Harnik)AP

Of all people who have ever set foot inside the Beltway, Donald Trump should understand the fallacy of sunken costs.

That’s the fallacy that built all those casinos in Atlantic City that The Donald used to run. The typical losing bettor believes that the more he spends, the more likely that his luck will change.

Nope. That money’s gone and there’s no sense trying to get it back.

The same principle applies to foreign policy. Back in 2016 when he was a candidate for president, Trump seemed to understand it.

"What do we have now? We have nothing,” he said in a debate over Mideast policy. “We've spent $3 trillion and probably much more - I have no idea what we've spent. Thousands and thousands of lives, we have nothing."

We do indeed. Yet like a losing gambler, Trump doubled down on a bad bet when he accepted the advice of the aides who told him that targeting a top Iranian official would win him enough chips to get ahead in this game.

We’ll never get ahead. We should just quit while we’re behind, said one hero of the first Iraq War.

Retired Colonel Douglas Macgregor commanded an armored unit in the 1991 Gulf War that won the biggest tank battle since World War II. He said the best thing Trump can hope for now is for the Iraqis to demand an end to the U.S. military presence.

At that point the president could say, “Thank you very much. We’re leaving. Then let the fighting begin.”

The fight in question would pit the Shia Muslims of Iran and Iraq against the Sunni Muslims under Turkish President Recep Tayyip Erdogan, he said. The two sides have been itching to go at it and the U.S. now sits right in the middle of the battle zone.

“All our soldier in the area do is sit there and provide targets,” Macgregor said. “We need to wake up smell the coffee and get out of where we don’t need to be.”

Those defending the hit on Iranian General Qassem Soleimani argue that he was “a bad man” because he killed a lot of people. But a lot of the people the Shia militia leader killed were members of ISIS, the Sunni group that tried to take over Iraq after the U.S. invasion.

“General Soleimani was instrumental in aligning the Shiites to do what we wanted to do against the Sunni,” he said.

Then there was the other major figure killed in the attack, Abu Mahdi al-Muhandis. He was the head of Iraq’s Popular Mobilization Forces. (As retired Colonel Pat Lang notes, that’s a bigger issue for the U.S. and we should take the opportunity to leave Iraq ASAP)

“The Popular Mobilization Forces were working with us against the same enemies,” said Macgregor.

Killing an Iraqi officer on Iraqi soil was a really bad bet.

Macgregor’s take on this is simple: There are no bad men or good men. Just combatants – and it’s not our fight.

“If you get out of the way they will fight each other,” he said. “The people at the top of the Israeli Defense Forces have a rule: When your enemies are killing each other, don’t interrupt them.”

That’s the sort of cold calculus Trump promised us back when he was running against Hillary Clinton. But once safely in office, he seems to have forgotten that when he hired neoconservatives like Secretary of State Mike Pompeo.

“Trump’s personnel management has been appalling,” said Macgregor. “The people he’s got working for him could just as easily have worked for Hillary Clinton.”

Those people are obsessed with Iran, but it wasn’t the Shiites of Iran who attacked us on 9/11. It was the Sunni of Saudi Arabia.

“There’s been a concerted effort to transform this fight into something against Iran, which is not in our interest,” he said.

Even if it were in our interest, we should just let the Turks do it, said Macgregor. They’re good at it and they do it often.

If you doubt that, he advised, Google “Ottoman-Persian Wars.” The Wikipedia entry documents 11 such wars dating back to the Battle of Chaldiran in 1514. The Ottoman Empire won most of them.

That empire fell out of existence after World War I, but Erdogan seems determined to restore it, Macgregor said.

“We just did a major favor for Erdogan,” he said. “He wants to take big chunks of Iraq.”

The biggest fallacy is to think the Beltway crowd has the ability to sort this out.

Before Trump sends good money after bad, he should consider what a smart gambler does when he gets a bad hand.

He folds.

ADD: THE HEIGHT OF HYPOCRISY:

The same Democrats who are decrying Donald Trump’s warlike actions in Iraq were opposing his decision in October to pull troops out of Syria. As I wrote here, it was the Democrats under Barack Obama and Hillary Clinton who invaded two sovereign states Libya and Syria, in an effort to promote regime change.

The Democrats have also shunned the most antiwar candidate in their presidential field, Tulsi Gabbard, because she had put Americans’ interest in peace above the Democratic efforts to push more war. Hillary famously proclaimed “We came. We saw. He died.” before the gory death of Moammar Khadafy. That effort at imposing a no-fly zone over Libya led to the Benghazi tragedy, but she wasn’t finished. Recently she was calling for a no-fly zone in Syria as yet another effort at regime change.

Trump may have bungled this one. But the Clinton-Obama team authored far greater fiascos in Libya, Syria and Yemen.

BELOW: Colonel Macgregor gives the sort of “America-first” advice that Trump promised before he decided to put other countries first: