American troops shot dead four Afghan soldiers and wounded four outside the US embassy in Kabul on Wednesday, Afghan officials said.
Amrullah Salihi, a senior Afghan intelligence official, said those attacked were spotted moving weapons at a military compound.
"It was a misunderstanding," he said.
"The US soldiers thought the Afghan soldiers were aiming guns at them," another intelligence official added. "They panicked and opened fire."
The incident came just after Washington raised its terror alert status to high after recent bombings in Saudi Arabia and Morocco, and could prove an embarrassment for the main backer of the fragile government of President Hamid Karzai.
Rafiullah, an officer with the Kabul garrison, said no US soldier was hurt. Police earlier said one American might have been hurt when one of the wounded Afghans fired in self-defence.
Heavily armed Marines in sandbagged watchtowers guard the embassy.
US soldiers blocked off the road in front of the embassy immediately after the mid-morning incident.