Two US soldiers were killed and 10 wounded in a suspected insider attack in Afghanistan on Monday, after President Hamid Karzai accused Washington of colluding with the Taliban to justify its presence in the country.
The White House strongly rejected the allegations, saying the US has "spent enormous blood and treasure" in supporting the Afghan people and did not support any kind of violence involving civilians.
"That's categorically false, and nobody believes it," White House spokesman Jay Carney said, echoing earlier remarks by the commander of US and NATO troops in Afghanistan, General Joseph Dunford.
The attack in the flashpoint eastern province of Wardak by an individual in an Afghan army uniform also killed several Afghan soldiers and wounded a number of others, military officials said.
Karzai stunned US officials with his remarks on the Taliban on Sunday during a visit by new Defense Secretary Chuck Hagel that had already been marred by a security scare from twin bomb attacks on Saturday.
"The bombs that were detonated in Kabul and Khost were not a show of force, they were serving America," Karzai said, referring to the two suicide blasts in which 19 people were killed.
The president said the United States was in "daily" talks with the Taliban in Europe and Gulf countries, and that insurgent suicide attacks enabled the international military force to justify its deployment in Afghanistan.
"It is their slogan for 2014, scaring us that if the US is not here our people will be eliminated," he said, as US-led combat troops begin a long withdrawal after more than a decade of war.
Karzai, who has frequently lashed out at perceived US slights, was angered by a new delay to the planned transfer of the controversial Bagram jail from US to Afghan control.
He is also adamant that his government must be involved in any US-Taliban contacts, although the Islamist militia dismisses him as a US puppet and says no dialogue has taken place with the Americans since a year ago.
Waheed Wafa, director of the Afghanistan research centre at Kabul University, said Karzai's remarks were not an irrational outburst, but a message calibrated for a domestic audience.
"Using this language Karzai is trying to convince the Taliban into peace talks under his administration and keep the US away," Wafa told AFP.
"Karzai's fear is that he will be sidelined from the process. This hurts Karzai and provokes him into saying things like yesterday and making decisions such as removing US special forces from Wardak and imposing a deadline for the Bagram handover."
The attack in Wardak came after the end of a deadline Karzai set for the departure of US elite special forces from the strategically important province, accusing them of fuelling instability.
More than 60 foreign soldiers were killed in 2012 in insider attacks that have bred mistrust and threatened to derail the training process.
The most recent came on Friday in the restive eastern province of Kapisa, where a NATO civilian contractor was killed by three people wearing Afghan security force uniforms.
General Dunford, commander of the 100,000 NATO forces in Afghanistan, said Karzai's allegations were false.
"We have no reason to be colluding with the Taliban, we have no reason to be supporting instability in Afghanistan," he said.
Hagel, on his first official visit to Afghanistan after he endured a difficult confirmation process by the US Senate, tried to downplay tensions with Karzai after they met in private.
Both Hagel and Dunford denied that the US-Afghan relationship was broken, and a senior US official said on condition of anonymity that Washington still felt it could have a "productive relationship" with Karzai and the Afghan government.
But the official added: "We have indicated to him in private that public criticism is not helpful to the partnership, especially when there's no basis in fact for some of the claims he makes."
The testy exchanges came as the two countries face up to an arduous transition phase in which NATO-led troops exit Afghanistan and Afghan forces take on fighting the Taliban alone.
The United States and Afghanistan are also negotiating a strategic pact that will determine the US presence in Afghanistan after the end of the international combat mission.