Jim Michaels and Tom Vanden Brook

WASHINGTON — An Afghan soldier opened fire at an Afghan training base Tuesday, killing an American two-star general and wounding more than a dozen coalition forces.

The officer, identified by the Pentagon as Maj. Gen. Harold Greene, is the highest ranking American officer to be killed in the Afghanistan war.

Greene was among a group of coalition troops assembled at the base for a presentation and it was not clear whether he was specifically targeted.

The assailant was killed in the attack, according to Rear Adm. John Kirby, the Pentagon press secretary. Fifteen coalition forces were injured in the attack, including eight Americans. A German general officer was also injured.

Before Tuesday, the most recent U.S. general officers to die in war was a brigadier general who died in Vietnam in 1972, Pentagon records show.

The attack appears to be the latest incident of a so-called "insider attack," in which Afghan soldiers turn on American and coalition troops.

The insider attacks had increased over the years and emerged as a major threat to the mission by 2012. Attackers that year killed 62 coalition troops. At the time most of the attacks were blamed on personal grievances and there were few cases of Taliban infiltration of influence.

The top commander at the time, Marine Gen. John Allen, instituted a number of changes to reduce the threat, including the use of "guardian angels," requiring troops to operate in pairs or groups and keep an eye out for potential attackers.

Coalition and Afghan officials also enhanced screening of police and army recruits, requiring, for instance, biometric screening and letters vouching for their loyalty by village and tribal elders. Recently, insider attacks have declined dramatically.

"It's impossible to ... completely eliminate that threat," Kirby said. "But you can work hard to mitigate it and minimize it, and ISAF has done that," he said referring to the coalition command.

The shooting took place at the Marshal Fahim National Defense University in Kabul, an officer training facility that was created under coalition supervision.

President Obama has been briefed on the attack, spokesman Josh Earnest said.

The shooting is "a painful reminder" of the sacrifices that Americans have made in Afghanistan, and they are still facing risks, Earnest said.

Earnest did not provide names or details of the shooting, saying an investigation is ongoing.

Contributing: David Jackson