An Afghan soldier opened fire at a British-run military academy outside Kabul on Tuesday, killing a US major general and wounding at least 15 other troops including a German brigadier general.

The US two-star general was identified by a US official to the Associated Press as Maj Gen Harold Greene, who becomes the highest-ranking American officer killed in nearly 13 years of war in Afghanistan. The Pentagon's press secretary said he believed the officer was the highest ranking US military casualty since 9/11.

"Our thoughts and prayers are with Maj Gen Harold J Greene's family, and the families of our soldiers who were injured today in the tragic events that took place in Afghanistan. These soldiers were professionals, committed to the mission. It is their service and sacrifice that define us as an Army," said General Ray Odierno, the chief of staff of the US army

Early reports of the incident were fragmentary. A terse initial statement from Nato's command in Afghanistan, known as the International Security Assistance Force or Isaf, said that an "incident" at the Qargha academy, also known the Marshal Fahim National Defense University, killed an Isaf service member.

Afghan defence ministry spokesperson Zahir Azami said that a soldier wearing an Afghan national army uniform opened fire on a group of international and Afghan soldiers, killing one and wounding an unspecified number of others.

A US official told the Associated Press that "about a dozen" American troops were wounded. The assailant was killed, although it is not clear whether a US or Afghan soldier killed him.

The New York Times first identified the rank of the dead officer. The Pentagon press secretary, Rear Adm John Kirby, would only confirm that a "general officer" had been killed.

"It's a terrible day, a terrible tragedy," Kirby said.

Germany's military said 15 Nato soldiers were wounded, in an assault launched "probably by internal attackers". Kirby said the daylight incident occurred during a "routine site visit" by US officers. The wounded included a German brigadier general, who the German military said was receiving medical treatment and was "not in a life-threatening condition."

The Ministry of Defence in London said it was investigating. "We are aware of reports of an incident at Qargha. The incident is under investigation and it would be inappropriate to comment further at this time," a spokesman said.

General Mohammed Afzal Aman, the chief of staff for operations at the Afghan defence ministry, said it was also investigating the reports.

"We are investigating, but it appears that an Afghan army officer opened fire. Three of our officers have been injured, some [Nato] troops have also suffered casualties."

The killing, known in Pentagon and Isaf parlance as a "green on blue" – for a sponsored force turning on its – represents a return to a vexing and wrenching problem faced by international forces in recent years.

By 2012, assaults from Afghan forces had become one of the greatest dangers to US and allied troops in Afghanistan, rivalling homemade bombs, and military leaders said they were unsure about what was driving the attacks. The Long War Journal website chronicled 44 green-on-blue attacks that year.

Better screening and more thorough monitoring of Afghan recruits, coupled with senior-level attention, has typically been cited as a cause for a sharp drop in 2013 and 2014, which have seen 15 such attacks. The bloody day in Kabul is the first such attack since February, and it occurs amid persistent uncertainty surrounding an Afghan presidential election that will determine the future of the US and allied troop presence after this year.

"The insider threat is a pernicious threat," Kirby said, but he dismissed concerns it would undermine US-Afghan cooperation.

"The Afghan national security forces continue to perform at a very strong level of competence and competence and warfare capability," Kirby said.

The officers' training academy, dubbed "Sandhurst in the sand", took its first cadets last October, and will be the only remaining British military presence in the country after operations end this year.

General and flag officers rarely die in combat zones, often a function of their placement in planning areas outside of the fiercest fighting. Even in the unconventional recent counterinsurgency conflicts in Iraq and Afghanistan, where battle fronts and rear areas can arise and change places with each embedded bomb, that pattern has held.

In 2010, a suicide bomber assaulted a Kabul minibus convoy, killing four US and Canadian colonels and lieutenant colonels. A 2008 mortar attack on the secured Green Zone in Iraq made the US army's Stephen Scott, who died while exercising on a treadmill, the ninth US colonel killed in that conflict.



Agencies in Kabul and London contributed to this report