The diatribe launched by Hamid Karzai, Afghanistan’s president, against the west has sparked a fresh bout of soul-searching among allies desperate to transform him from hindrance to help in their campaign against the Taliban.

The task has taken on a new level of urgency ahead of an offensive in Kandahar province this summer that will represent the most significant attempt to swing the direction of the war back in Nato’s favour.

But the shock that greeted Mr Karzai’s remarks last week shows diplomats are no closer to solving one of the conflict’s great riddles: a man almost entirely dependent on US backing to survive seems intent on undermining his most powerful ally.

In a speech, Mr Karzai accused the west and the United Nations of orchestrating massive electoral fraud and seeking to undermine his administration and run a “puppet” government.

The timing of the remarks – delivered just days after a visit by Barack Obama, the US president – looked like a deliberate snub to an ally who has ordered an extra 50,000 US troops to Afghanistan to bolster Mr Karzai’s government. The White House said the comments were “a genuine cause for concern”.

Although Mr Karzai later called Hillary Clinton, the US secretary of state, to clarify his comments, the outburst injected new rancour into his testy relations with his allies.

“The analysis is not that he got emotional and went crazy,” said a western diplomat in Kabul. “This was done in a calculated fashion. We don’t understand what that calculation is.”

Mr Karzai has long sought to shore up his domestic political base by casting himself in the role of chief critic of the failings of his allies, particular those that lead to civilian casualties.

By publicly painting foreigners as conspirators against his government, Mr Karzai took his criticism into new territory.

Escalating the rhetoric poses military and political risks. Stanley McChrystal, the top Nato commander in Afghanistan, has based his strategy on convincing Afghans to side with the western-backed government, a task that may be complicated by the president’s anti-foreign stance.

Mr Karzai’s inflammatory remarks threaten to reopen the debate among US and European voters about why their troops are dying to uphold his government.

His outburst will also reignite frustration in western capitals over the lack of progress he has made in enacting reforms agreed at a conference in London in January that was supposed to herald a new era of co-operation. Mr Karzai has deflected western pressure to confront the corruption fuelling the insurgency by denying there is a problem. Instead of embracing electoral reform, he is seeking to seize control of the watchdog that uncovered widespread fraud in August’s presidential polls.

The paradox is that the troops deployed and the billions of dollars spent in Afghanistan should give Washington and its partners enormous leverage. Instead, Mr Karzai has gambled that his allies are so committed to Afghanistan that he is indispensable. The harder his backers push, analysts say, the more he can portray them as bullies to blame for Afghanistan’s miseries.

The Afghan president’s dependence on foreign support has not prevented him from seeking leverage of his own. Pledges to pursue reconciliation with the Taliban increase his capital by holding out the hope that a western mission that may yet end in failure might instead bring peace. By deepening links with China and Iran, Mr Karzai shows he has options.

Veteran Afghanistan watchers say the US has compounded its problematic relationship with Mr Karzai by being inconsistent. While the Bush administration embraced Mr Karzai, officials in the Obama administration have wobbled. The variety of key players in Kabul who deal with the president, including Gen McChrystal, Karl Eikenberry, the US ambassador, and Richard Holbrooke, Mr Obama’s representative, makes cohesion all the more elusive.

“We’re pretty handcuffed,” said Marvin Weinbaum, a scholar at the Middle East Institute in Washington. “We find ourselves in a situation where it’s difficult to live with him and we can’t live without him.”

Copyright The Financial Times Limited 2018. All rights reserved.

Comments have not been enabled for this article.