The United States should teach Afghanistan’s lame-duck leader a lesson and pull all of its troops out of the country in 2014, when most foreign troops are scheduled to withdraw.

Only if President Hamid Karzai sheds his outsized ego and signs the pending Bilateral Status Agreement before the end of the year should our troops remain there.

The agreement would allow the United States to keep some forces to train the Afghan military and conduct counterterrorism operations after combat troops depart by the end of next year. Meanwhile, Karzai wants assurances from President Obama for a “complete cessation” of U.S. and allied counterterrorism raids on Afghan homes.

Karzai is really pushing the envelope. The Afghan military is deeply concerned, because it would be left without American troops to help train its soldiers to ward against a possible civil war or Taliban resurgence. Even the tribal elders and regional council leaders overwhelmingly approved the draft agreement.

Moreover, a full pullout would endanger more than $8 billion in annual funds for the country’s security forces and in development assistance. The United States has already sunk $20 billion in recent years to train the Afghans, which could go right down the drain without a timely agreement.

The United States has a lot to lose here besides money in its long-term bases in Afghanistan, and a staging platform for counterterrorism missions against al-Qaida.

But the two-time president, who is constitutionally barred from running in the April elections, would rather defer to whoever succeeds him. Blaming inaction on so-called succession protocol is lame and tiresome.

Karzai is biting the hand that has fed him. His government is largely bankrolled by the United States which has, for better or worse, mainly stuck by the devil it knows. In return, the Afghan president once suggested that he might join the Taliban if the United States continued to pressure him over corruption in the government and his brothers’ alleged links with the Kabul Bank scam and drug traffickers.

He is obviously trying to appease someone, even if it costs everyone. The United States must not back down from a man who is teetering on the brink of madness.