• Relations strained as diplomats clash with Afghan officials • US irritated by Karzai's decision not to sign security pact

The White House has threatened to pull all US troops out of Afghanistan if it is unable to persuade Hamid Karzai to sign an agreement on a remaining military presence, after a tense dinner in Kabul that has strained relations between the two governments.

Amid signs that patience for the process may be faltering in Washington, officials say that US national security adviser Susan Rice warned Karzai, the Afghan president, that his latest proposal to delay signing the deal until next year would jeopardise their plan to keep a security presence in the country after the bulk of US troops pull out.

"Ambassador Rice reiterated that, without a prompt signature, the US would have no choice but to initiate planning for a post-2014 future in which there would be no US or Nato troop presence in Afghanistan," said a White House spokesman.

"Deferring the signature of the agreement until after next year's elections is not viable, as it would not provide the United States and Nato allies the clarity necessary to plan for a potential post-2014 military presence."

The remarks followed a dinner for Rice and Karzai on Monday night, where US diplomats clashed with Afghan officials over the issue of returning Taliban suspects held in Guantánamo Bay.

President Karzai's spokesman said on Tuesday that a blunt response from US ambassador James Cunningham, when Karzai raised the question of the release of Afghan prisoners from Guantánamo, soured what had previously been a constructive meeting.

“The beginning until almost the end was pretty calm and good, although there were disagreements,” Aimal Faizi, the spokesman, told the Guardian. “But the comments of the ambassador at the end … that changed the meeting, from that point.”

Cunningham, Faizi said, told Karzai that the peace process was not the responsibility of the US, and the release of prisoners was not part of the strategic pact.

US officials were said to be irritated by a surprise decision by Karzai not to sign the troop deal even though it had been ratified by a national tribal gathering, or loya jirga, at the weekend.

Their threat to start planning for no US presence at all came as Republican hawks in Congress indicated they supported an uncompromising negotiating position from the White House.

"President Karzai needs to understand the American people's patience with him is not unlimited," said Republican senator Lindsey Graham.

The White House has threatened what it calls the "zero option" – no US troops – before, although it inflames the Pentagon, which wants to keep several thousand troops after the main withdrawal to ensure the Taliban do not regain the upper hand.

A key question in Washington is whether all this provides the White House with an excuse to get out of Afghanistan altogether.

Similar circumstances after the US failed to agree on terms to keep residual troops in Iraq did little political damage to Obama. There are still 47,000 American forces in Afghanistan, but the US would like to reduce this to 8,000 as it winds down its full-scale military presence next year.

However, if the US does not strike a deal in Afghanistan after 2014, they have no staging ground to launch drone strikes into Pakistan, or would have to negotiate one with one of the former Soviet republics, giving a wider strategic importance to the clash with Karzai. Karzai's spokesman has said that he does not believe the "zero option" is a real possibility.

The loya jirga, or grand assembly, convened by Karzai last week to debate the strategic pact, is a pliant modern reinvention of an old tradition, which brought together hundreds of influential but acquiescent delegates from around the country.

Its convocation was expected to give Karzai political cover for signing a controversial agreement that critics say betrays Afghan sovereignty. Even some of his closest advisers were astounded when he told the opening session he wanted to delay signing until next spring.

The hand-picked jirga members almost overwhelmingly recommended that Karzai sign the deal by the end of the year, as the US has demanded, but also listed a range of other demands from an extra US base in central Bamiyan province – once the site of Taliban massacres – to the release of Guantánamo prisoners.

Karzai's spokesman said the president warned US diplomats at their dinner that they could not simply claim that the loya jirga's conclusion compelled him to sign the deal into law.

"The president said: 'You cannot pick and choose from the recommendations. The one that says it should be signed by the end of the year you like, and you are using it, but the one about the release of prisoners (from Guantánamo), you ignore.'"

Karzai and the US government have a long history of tense negotiations involving public brinkmanship, on issues ranging from control of Bagram prison to the results of the 2009 presidential election, which returned Karzai to power but was plagued by widespread fraud.

In most of the high-stakes showdowns, despite US power and wealth, Karzai has walked away with a deal that gave him most of what he wanted, while Washington retreated from positions that seemed like red lines.

US officials, and many Afghans, feel that the stakes are different this time, as America may finally be tiring of the cost in lives and budget dollars of a very long war.

“If this strategic pact isn't signed, the Taliban will come back and all the achievements of these last 11 or 12 years will be destroyed,” said Mojibullah, a 49-year-old wood merchant from Parwan province, north of the capital. “I think Karzai is delaying because he wants some power in the next government.”

Karzai, however, is convinced that US demands for a signature by the end of the year are pure showmanship.

"We don't believe there is a zero option,” Faizi told journalists earlier this week.