Afghan President Hamid Karzai belongs in a comic opera, not as president of a beleaguered nation that desperately needs U.S. support. Mr. Karzai loves to strike an independent pose when he is anything but independent.

It often seems that the only way to persuade him to adopt a policy is to advocate its opposite.

Take peace talks with his Taliban opponents, for example. Mr. Karzai has been for them, but only on his terms.

So it was a welcome surprise that he agreed to send representatives when the Taliban announced Tuesday that they would open an office for peace talks with the United States and Afghan representatives in Qatar on the Persian Gulf.

For a brief moment, the prospects of a peaceful settlement of the more-than-decade-long war in Afghanistan seemed to come into view.

But then Mr. Karzai changed course. Maybe he realized he was acting out of character. For whatever reason, he announced Wednesday that he would not only not send representatives to Qatar for peace talks with the Taliban, he would also break off talks with the United States on the future of American-Afghan relations. Those talks are focused on conditions under which the United States would continue to maintain a military and diplomatic presence in Afghanistan after the 2014 departure of NATO combat forces.

In his Wednesday turnabout, the Afghan president blamed the United States for failing to live up to an alleged promise that the Taliban would not be allowed to operate in Qatar under the name “Islamic Emirate of Afghanistan.”

When the Taliban in Doha, Qatar’s capital, displayed this name on their office, Mr. Karzai said the Afghan government had suspended the latest round of talks with the U.S., already under way in Kabul, “in view of the contradiction between acts and the statements made by the United States of America in regard to the peace process.”

All the United States has done “in regard to the peace process” is to send hundreds of thousands of American troops into harm’s way while combating the Pakistan-supported Taliban insurgency and protecting Afghan civilians. And President Karzai, who has been paid handsomely by the CIA to cooperate.

Mr. Karzai seems incapable of seeing the difference between a largely meaningless symbol — the Taliban don’t rule Afghanistan, no matter what name they give themselves — and the real interest of his people in keeping the Taliban out of power.

Afghans won’t achieve that goal unless they work together to build up and sustain their government’s ability to defend itself against Mullah Omar and his Pakistan army sponsors. They won’t succeed without continuing U.S. assistance.

And if Mr. Karzai persists in his erratic act, he risks losing that American help his nation so desperately needs.