A U.S. Army major general was fatally shot when a man dressed in an Afghan Army uniform opened fire Tuesday at a military base in Afghanistan. Fifteen others, including a German brigadier general and both American and Afghan troops, were wounded in the attack.

The gunman shot into a group of soldiers at a military training academy for Afghan soldiers, 11 miles west of Kabul, said Pentagon spokesman Rear Adm. John Kirby. U.S. soldiers train hundreds of Afghan military servicemen at the Marshal Fahim National Defense University at Camp Qargha each month.

Ministry spokesman Gen. Mohammad Zahir Azimi said a "terrorist in an army uniform" shot at both local and international troops, reports Fox News.

U.S. officials say the shooting victim was a two star major general and the highest ranking official to be killed in the Afghanistan war. A senior Afghan commander also was wounded in the attack and the eight Americans who were wounded are expected to survive.

The shooting has been noted as an "insider attack," an incident where Afghan security fire against their NATO partners. This was the first insider attack to take place in Afghanistan in months.

The gunman, who has not been identified, was subsequently killed.

According to ABC News, the Taliban claimed responsibility for the attack.

Kirby also said officials believed the gunman was "a member of the Afghan national security forces."

He added that the attack is "a pernicious threat and always difficult to ascertain."

ISAF Joint Command released a statement, saying, "We are in the process of assessing the situation. More information will be released as we sort out the facts."

Retired U.S. Army Col. Jack Jacobs told NBC News that these type of attacks are caused when troops become disgruntled about assignments or their paychecks, rather then because they were "planted" by the enemy.

"It's very disturbing in any case," Jacobs said, adding, "and particularity so because we spend a great deal of time and money for Afghan troops to take over the defense of their country by themselves."