An Afghan soldier shot dead a US general at an army training centre in Kabul -- the highest-ranking American officer to be killed since the September 11, 2001 attacks.
The shooting, which left more than a dozen other soldiers including a senior German officer wounded, rocked the US-led project to train up the Afghan army as NATO combat forces withdraw after 13 years of fighting the Taleban.
The Afghan soldier was himself killed after he opened fire during a high-level visit by NATO officers to the Marshal Fahim National defence University, a sprawling training complex on the outskirts of the capital.
"Among the casualties was an American general officer who was killed," Pentagon spokesman Rear Admiral John Kirby told reporters in Washington, declining to name the general.
Kirby said that the fatality was the highest-ranking US officer to have been killed since the 9/11 attacks when Lieutenant General Timothy Joseph Maude was killed by a hijacked airliner that crashed into the Pentagon.
No US general has been killed in combat since the Vietnam War.
Kirby said that "up to 15" people were injured in Tuesday's attack. Separately, the German army said that one of its generals was wounded.
"We believe that the assailant was an Afghan soldier," Kirby added.
Afghan officials had earlier described the attacker as a man wearing Afghan uniform, suggesting he may not have been a soldier.
The shooting was by far the highest profile "insider attack" of the Afghan conflict, in which scores of US-led NATO troops have been killed by Afghan soldiers turning their guns on their allies.
Also known as "green on blue" attacks, the killings have bred fierce mistrust among soldiers and forced joint patrols to be overseen by armed guards.
The Taleban did not immediately claim responsibility for the attack, and Western officials say that most such attacks stem from personal grudges and cultural misunderstandings rather than insurgent plots.
"Insider attacks" declined rapidly last year as NATO combat troops closed many bases and reduced operations before their complete withdrawal by the end of this year. Screening of Afghan army recruits was also tightened.
Afghan army under pressure
President Hamid Karzai condemned Tuesday's attack as a "cowardly" strike against Afghan and NATO officers.
"It is the work of those enemies who do not want to see Afghanistan have its own strong institutions," he said.
General Mohammed Afzal Aman, the chief of staff for operations at the Afghan Ministry of Defence, told AFP that three Afghan army officers were injured.
"ISAF ( International Security Assistance Force) have quarantined the site, allowing nobody, including Afghan forces, to approach," he said.
An official statement from Berlin said the injured German brigadier general was not in a life-threatening condition.
The Afghan military has been built from scratch since the fall of the Taleban regime in 2001, and it has struggled with high casualty rates, "insider attack" killings, mass desertions and equipment shortages.
In February this year, two Afghan men wearing military uniforms shot dead two US soldiers in the eastern province of Kapisa.
Also on Tuesday, Afghan officials accused an ISAF air strike of killing four civilians in the western province of Herat.
"After rockets were fired at Shindand airbase, an aircraft carried out strikes on the area where they were launched," Herat's deputy governor Asiludin Jami told AFP.
"A man, a woman, a kid and a teenager were killed. They were all civilians."
ISAF said it took all allegations of civilian casualties seriously, and was assessing the facts surrounding Monday's incident.
Afghanistan is holding an audit of eight million votes cast in presidential elections as a dispute over fraud threatens to trigger a spiral of ethnic violence.