NATO says one of its service members was killed and two others wounded in in attack in Herat province.
"Initial reports indicate the attack was committed by a member of the Afghan security forces," the NATO-led Resolute Support mission said in a statement.
The Taliban claimed the assailant was one of its infiltrators in the ranks of Afghan security forces.
Meanwhile, the U.S. army has confirmed that a brigadier general was one of two Americans wounded in an attack last week in Afghanistan that fatally wounded a powerful Afghan police chief.
U.S. Army Brigadier General Jeffrey Smiley, in charge of NATO's military advisory mission in Afghanistan, was shot when a gunman wearing an Afghan security forces uniform opened fire on a group of officials leaving a meeting with the top NATO commander in Afghanistan, General Scott Miller.
Miller escaped injury, but a U.S. civilian was also shot.
General Abdul Raziq, an anti-Taliban strongman, was mortally wounded, along with the local head of the NDS intelligence service General Abdul Momim.
The Taliban claimed responsibility for the attack inside the highly secured compound, dealing a severe blow to the Afghan government in one of its most strategically important provinces. The incident demonstrated the insurgents' ability to strike top leaders.
Ayaz Gul contributed to this report.