President Hamid Karzai exploded in anger when he learned last week that an American soldier had massacred 16 Afghan civilians, including nine children.
When Karzai discovered that an aide had kept the news from him until after he had addressed the nation on television, the anger turned to rage.
I would have condemned this openly to my people, Karzai shouted at the aide in the Kabul television studio, officials told Reuters.
Turning to another official, Karzai made himself even more clear: After a decade of war against al Qaeda and the Taliban, it was time for U.S. forces to leave Afghanistan, he said.
Events may have got out of hand if the aide had indeed told Karzai before the live televised speech on women's rights.
By the time Karzai's office issued a statement about the killing near a U.S. base in the south, the reaction was muted and there was no call for an American withdrawal from Afghanistan.
Karzai condemned the rampage as intentional murders and demanded an explanation from the United States, but nothing more.
He has slim room for manoeuvre in a war that has tested both his presidency and that of his U.S. counterpart, Barack Obama. Installed by the United States as interim leader after U.S.-backed Afghan forces toppled the Taliban regime in 2001, he has to walk a line between growing public anger over the presence of Western troops and Washington's support of his government.
Karzai was later elected president but his very survival hinges on the 90,000 American troops who hold his Taliban enemies at bay, along with the massive influx of Western aid that pays Afghan bureaucrats and which keeps the country's fragile economy afloat.
The Afghan leader is still haunted by the fate of former Afghan president Mohammad Najibullah when the Taliban took power in 1996. After being tortured and castrated, Najibullah, a protégé of the former Soviet Union, was strung up on a street lamp close to his palace.
Any return of the Taliban to power would could bring a similar fate to Afghan leaders and anyone else seen as siding with the Americans.
Tens of thousands of people will be killed here if the Americans pack and get out, said independent parliamentarian Mirwais Yasini, who predicted the Taliban would seize power again in just a matter of weeks if U.S.-led NATO forces headed home now.
HALF A WORLD AWAY
Obama would not face the same dangers that Karzai could if the Taliban emerge victorious, but failure after one of America's longest wars would still be devastating for him in a year in which he faces re-election.
Half a world away on Sunday afternoon, Obama sat in his limo outside his daughter's basketball game in suburban Maryland as he picked up the phone to call Karzai after he was informed of the shootings.
When he first spoke publicly about the killings the next day, Obama vowed the United States would not be chased out of Afghanistan. But he said the shooting had only strengthened his determination to bring U.S. troops home.
It's time. It's been a decade, he said.
The recent incidents underscore the hazards facing Karzai, who heads a weak, unpopular government under threat by insurgents, and Obama, intensifying what's likely to be a difficult election campaign while he seeks to end a costly war.
But the risks of a precipitous withdrawal are even less palatable for both leaders, leaving them only room to tweak their positions on the margins.
Obama's strategy for exiting Afghanistan, the product of bitter debates among his political and military advisers, appears locked in stone, with only the precise pace of the troop drawdown at issue. For now, most foreign combat troops are to leave Afghanistan by the end of 2014.
While Obama's Republican opponents, such as Mitt Romney, have criticized Obama's withdrawal, saying that a predetermined timeline will only embolden U.S. enemies, the views of some of his rivals may be changing in light of recent events.
There's not much appetite left in the White House to continue the war, a former U.S. government official said on condition of anonymity.
The emphasis now is how do we withdraw as quickly as possible, with as little damage to our interests as possible.
Karzai appears to be trying to shape the nature of the remaining NATO presence in a way that will minimize civilian losses.
On Thursday, the Afghan leader called for NATO troops to leave Afghan villages and confine themselves to major bases, issuing what appear to be a surprise challenge to his Western backers just after U.S. Defense Secretary Leon Panetta ended a visit to Kabul.
Pentagon officials however said they did not believe he was calling for an immediate withdrawal to bases. There was no change in U.S. plans for a gradual transition to Afghan security leadership, they said.
The massacre in Kandahar, Karzai's home province, is the latest of a series of Western blunders in Afghanistan that have infuriated ordinary Afghans. The others include a video that showed Marines urinating on the bodies of dead Afghans and the burning of copies of the Koran at a NATO military base.
The Koran burnings in particular struck a chord among Afghans and touched off a spate of bloody protests and attacks on U.S. soldiers that raised questions about the Western plan to put Afghan troops gradually in charge.
Recent events have only heightened the vulnerability of Karzai, who many Afghans see as a Western lackey who has been unable to provide effective governance, combat corruption or ease poverty despite billions of dollars in Western aid.
This is a very dark moment for Karzai, said parliamentarian Habiba Danish. People are extremely emotional and he has to find a way to calm emotions. We all do.
Outside Karzai's heavily fortified Kabul palace, Afghans complained Karzai was too weak to deal with what they called American atrocities.
It's time for him to go. We need someone who can bring justice for Afghanistan, said Abdullah Yosuf, 20, a university student.
The initial response in Washington to the shooting, meanwhile, was one of shock, followed by dismay.
Obama was briefed on Sunday about the massacre by a small group of security officials including Tom Donilon, his national security adviser, and retired Lieutenant General Doug Lute, his war czar.
His two top military advisers, Defense Secretary Leon Panetta and General Martin Dempsey, chairman of the Joint Chiefs of Staff, were on the West Coast when the news broke.
Both men reached out to Afghan leaders - Panetta calling Karzai and Dempsey calling Afghan army chief of staff General Sher Mohammad Karimi, seeking to personally reassure the officials that the soldier's actions were isolated.
Across Washington, the former official said, all of us had this feeling like we'd been punched in the stomach.
Privately, many U.S. officials also expressed anger that one rogue soldier - who many people suspect may have been affected by multiple deployments in Iraq - could do so much to erode whatever goodwill they had been able to build with Afghans.
It's disappointing; it's frustrating, one senior U.S. defense official said on condition of anonymity. This is one guy in a village in Afghanistan, making a decision on a tactical level that has strategic impact.
Obama has signalled loudly that he does not want to reopen the Afghan war strategy as he did when he took office in 2009.
I don't anticipate ... that we're going to be making any sudden additional changes to the plan that we currently have, he said on Wednesday.
Concerned with his re-election prospects, the economy, and domestic concerns like high gasoline prices, the president in public discussions of Afghanistan has focused on the U.S. raid that killed al Qaeda leader Osama bin Laden last year.
It is a feat which the White House hopes will seal Obama's national security credentials no matter the situation in Afghanistan.
While Obama will withdraw all of the extra 33,000 troops he deployed in a surge of forces in 2009-10 by later this year, his advisers are in discussions about how quickly they can afford to remove the rest of the troops.
Pressure from Obama's fellow Democrats has intensified in recent weeks for a faster drawdown, while a recent poll showed that more than 60 percent of Americans favour an immediate withdrawal.
Critics who say we should just leave don't have a real policy, said Bruce Riedel, a former White House and CIA official who chaired Obama's Afghan strategy review in 2009. Building up the Afghan army and transitioning is still the only game in town.
THE TALIBAN QUESTION
The fixed military strategy only increased the importance of U.S. diplomacy in Afghanistan. After months of covert efforts, U.S. officials have hoped they were close to being able to broker unprecedented political negotiations between the Taliban and Karzai's government.
It's unclear whether that initiative will proceed; the Taliban said on Thursday they were suspending that process, blaming shaky, erratic and vague U.S. statements.
Karzai expressed concern to Afghan officials that the Taliban would try to capitalise on the Kandahar massacre to gain more recruits.
He was right.
Taliban fighters wasted no time in entering the village where the massacre took place and urging people to take up arms against the Americans and Karzai's government.
They handed out weapons to people and told them to be brave and take on U.S. forces. Then they warned the cleric in a government mosque to tell people to rise up, an intelligence official told Reuters.
The message seemed to sink in.
If the killer is not prosecuted in Kandahar we will go to the mountains and fight against the government, said Kandahar resident Khodai Nazar, 25.
Karzai, for his part, sent a delegation to the village, including two of his brothers, to investigate the shooting and try to retrieve some public support. Suspected Taliban insurgents opened fire on the officials.
One of the officials predicted people would rise up against the Americans and Karzai's government.
The official told me if these people had a decent life, a decent clinic and schools, clean drinking water, some sign that life had improved in 10 years, they could calm down, an Afghan minister told Reuters.
If there had been some change in their lives you could just tell them the American soldier was depressed and they could get over it. But where are the benefits for people?
(Additional reporting by Hamid Shalizi and Miriam Arghandiwal in KABUL; Matt Spetalnick, Caren Bohan and Steve Holland in WASHINGTON; Editing by Raju Gopalakrishnan and Robert Birsel)