The recent attacks bring the death toll of American troops to 2,000 since the start of the war 11 years ago, according to a count kept by the Associated Press. Afghan soldiers and policemen have gunned down more than 50 foreign troops so far this year.
The attacks are taking a toll on the partnership between international and Afghan forces. The U.S. military is now restricting operations with small-sized Afghan units.
It's not clear if the shooter in the latest attack was killed. The deaths are under investigation.
The Associated Press contributed to this report.