Three U.S. defense contractors helping train Afghan air force personnel were gunned down at the Kabul airport in what military sources say was an "insider attack."
The Taliban has claimed responsibility for the Thursday night killings.
Zabihullah Mujahid, spokesman for the insurgent group, said a Taliban "infiltrator working inside Kabul airport" carried out the assault and was killed in return fire.
An Afghan air force official said it was not clear why the attacker had killed the advisers.
"No one else was there to tell us the reason," the official told Reuters on condition of anonymity because he was not authorized to speak to the media. "An investigation has been opened."
Afghans in uniform have turned their guns on their American military trainers in the past. Last August, U.S. Major General Harold Greene was shot and killed by an Afghan soldier.
Despite the introduction of new measures, including a requirement that coalition forces be armed at all times and stricter vetting procedures for Afghan security members, incidents continue to occur sporadically.
Suicide bomber strikes at funeral
Also Thursday, a suicide bomber attacked a funeral in eastern Afghanistan. Sixteen people were killed and dozens wounded.
A local official said the attack took place in Mehtarlam, in Laghman province, during the funeral for a police commander and three others killed in a roadside bombing earlier Thursday.
No one claimed responsibility for either attack in Laghman.
The international "Resolute Support" mission, which started January 1, involves a small contingent of about 12,000 mostly U.S. troops and is to focus on training Afghanistan's national security force.
Some material for this report came from Reuters.