By now, we should be more used to — and less tolerant of — Afghan President Hamid Karzai’s machinations.

Over the last decade, he has pitched many a tantrum at U.S. officials trying to get his cooperation. His latest eruption is no tantrum.

He’s refused to follow the advice of his national council — the loya Jirga — to sign a long-term agreement allowing U.S. forces to stay in his country past 2014. And he’s signed a security treaty with Iran.

Karzai’s refusal of the U.S. deal drew an angry reaction from National Security Advisor Susan Rice, who said there would be no further negotiations.

The White House has made clear its threat to withdraw all U.S. forces from Afghanistan by the end of 2014 if Karzai doesn’t sign the agreement before the end of this year, and Karzai isn’t budging.

If this were business as usual, there would be more negotiations, more compromises and more accommodation and enrichment of Karzai’s kleptocracy. But Karzai is playing a new game that excludes the U.S. in favor of Iran.

President Obama wants the long-term agreement with Afghanistan so that about 12,000 of our troops can remain training Afghan forces.

They would also be there to protect U.S. officials and the Afghan government. (There are about 47,000 troops there now. There are also about 27,000 Coalition troops that will be withdrawn next year.)

It is impossible to see why Obama should want that agreement to be signed at all. If Obama’s plan is effectuated, only a small force — perhaps 10,000 troops — would be left in Afghanistan.

That force could, perhaps, secure some of the people in Kabul, but the Taliban — and now the Iranian terrorist proxy forces, such as the Iranian Revolutionary Guard Corps — would have the run of the rest of the country.

Obama’s evident purpose is to make sure the Taliban doesn't take over Afghanistan again before our 2016 election.

The fact remains that with or without the Karzai kleptocracy in charge, Afghanistan is not going to be secure against a Taliban takeover for much longer than it takes for the last helicopter to lift off from our Kabul embassy.

As it has in Iraq, nation-building has failed abjectly in Afghanistan. We can stay there another sixty days or another sixty years and the result will be the same: Afghanistan will return to its pre-9/11 status of terrorist base. The Taliban and Iran will see to that.

Our only option is what Secretary of State John Kerry proposed in his 2004 presidential campaign: to have an intelligence and reconnaissance “overwatch” on Afghanistan and to mount military action against any significant terrorist activity we learn of, no matter how many times it takes. That’s not a good result, but it’s the best we can do.

Karzai signed a cooperation agreement with Iran in a Tehran meeting Dec. 8. Reuters described it as a pact “for the long term political, security, economic and cultural cooperation, regional peace and security.”

Karzai has been playing this side of the street since at least August when an earlier Afghani-Iranian agreement was signed. This one is much broader.

Iran, of course, opposes any agreement with the U.S. that would leave American forces in Iran beyond 2014. Karzai may be trying to grant their wish, or he may be angling for an even better deal.

It would be easy, and wrong, to see Karzai’s deal with Iran and his delay of the deal with Obama as some breach of faith with us.

It’s entirely consistent with Karzai’s attitude toward the U.S. since he came to power in December 2001. Karzai’s clique may remain in power for a while after he leaves office.

Perhaps he wants to ensure his gang continues to profit whether Iran or the US or the Taliban is in charge.

There is no reason for us to tolerate Karzai’s actions, however they may be motivated. We have done all we can do in Afghanistan.

About 73 percent of our dead in Afghanistan have been killed since Obama decided to compound President George W. Bush’s nation-building mistake.

There's no reason to stay except to protect Obama from the blame for “losing” Afghanistan. That's not a reason to spend more lives there.

Jed Babbin is a former deputy undersecretary of defense and the author of "How Obama is Transforming America's Military from Superpower to Paper Tiger."