Eight NATO troops and a contractor died Wednesday after an Afghan military officer opened fire in a meeting, making it the deadliest episode to date of an Afghan turning against his own coalition partners, officials said.

The Afghan officer, who was a veteran military pilot, fired on the foreigners after an argument. The shooting occurred in an operations room of the Afghan Air Corps at Kabul airport.

"Suddenly, in the middle of the meeting, shooting started," said Afghan Air Corps spokesman Col. Bahader, who uses only one name. "After the shooting started, we saw a number of Afghan army officers and soldiers running out of the building. Some were even throwing themselves out of the windows to get away."

The nationalities of the eight NATO service members have not been released. Five Afghan soldiers were wounded. At least one Afghan soldier was shot in the wrist but most of the soldiers suffered broken bones and cuts, Bahader said.

Afghan President Hamid Karzai condemned the shooting and offered his condolences to the relatives of the victims. He said those killed were trainers and advisers for the Afghan air force. The president ordered his defense and security officials to investigate the recent incidents to determine why they occurred.

It was the seventh time so far this year that members of the Afghan security forces, or insurgents impersonating them, have killed coalition soldiers or members of the Afghan security forces.

The Taliban claimed responsibility for the attack. In a statement, Taliban spokesman Zabiullah Mujahid said the gunman, who was killed during the shooting, was impersonating an army officer and that others at the facility helped him gain access.

However, Defense Ministry spokesman Gen. Mohammad Zahir Azimi said the gunman was an Afghan military pilot of 20 years. "An argument happened between him and the foreigners and we have to investigate that," Azimi said.

An Afghan pilot who spoke on condition of anonymity, identified the gunman was Ahmad Gul, a 50-year-old pilot from Tarakhail district of Kabul province.