Two American soldiers were gunned down by an Afghan border policeman trainee in northern Faryab province.
Abdul Sattar Bariz, the deputy governor of the province, said the victims were American soldiers, killed at a checkpoint by a member of the Afghan Border Police on Monday.
"He killed the two trainers while they were teaching them, in Faryab city," Bariz told the Reuters news agency by telephone.
The International Security Assistance Force (ISAF) said it was investigating the deaths.
"According to initial reporting, an individual in an Afghan Border Police uniform fired on the ISAF members inside a compound. The individual who fired the shots fled the scene," an ISAF statement said.
On a number of previous occasions, members or purported members of the Afghan security forces have killed their foreign counterparts.
There are nearly 140,000 international troops, mostly NATO forces deployed under US command, in Afghanistan, tasked to defeat a Taliban-led insurgency.
Burning of Quran Anger
On Monday, protesters scuffled with police, as more than 1,000 Afghans protested for a fourth day to denounce the burning of a Quran by by Florida pastor Terry Jones, witnesses said.
Mohammad Aziz Gharanai, the police chief of Laghman province east of the Afghan capital Kabul, told the AFP news agency that protesters there had thrown stones at police but that police had not fired back. No one had been injured, he said.
But one witness told AFP by telephone that police responded by lobbing the stones back. Several gunshots were heard in the background as he spoke.
Witnesses told AFP that there were more than 1,000 people, almost all men, protesting in Mehterlam, the provincial capital of Laghman.
"I saw some people who threw stones at the police. Police threw them back and one person was injured by a stone," said a witness from the crowd.
They shouted "death to America -- long live Islam," another witness said.
"There are demonstrations. It started from Alingar district and now they're in the city," Gulzar Sangarwal, deputy head of the Laghman provincial council, an elected body, told AFP from Mehterlam.
The violence has killed at least 22, including seven foreign UN staff, and wounded nearly 140 other people.
In a similar incident last year an Afghan trainee soldier killed six American troops.