Two separate gun attacks on Nato-led troops in south Afghanistan have left a total of six US soldiers dead, coalition officials say.
An Afghan civilian employee shot three soldiers, all from the US, at a base in Helmand province on Friday evening.
Earlier on the same day, also in Helmand, an Afghan police officer shot three US marines after inviting them to dinner at a checkpoint.
The suspected killers in both attacks were detained, the US military says.
The killing of two British soldiers in Helmand was also announced on Friday, bringing to eight the number of coalition soldiers killed in Helmand in 48 hours.
There is mounting concern over attacks on Nato troops by their Afghan allies.
Members of the Afghan security forces have killed 34 international coalition soldiers this year, in 26 incidents, US military spokeswoman Maj Lori Hodge told the BBC.
Last year, there were 35 deaths, in 21 incidents, she said.
In spite of the gains made by coalition forces, and their attempts to wipe out militant leaders, almost every day brings proof that Taliban militants retain the capability to kill, the BBC's Aleem Maqbool reports from Kabul.
Maj Hodge said both the Afghan civilian employee and the police commander had been detained, the Associated Press news agency reports.
She said the Friday evening attack had happened at a base shared by Afghan soldiers and Isaf troops, and she described the attacker as an "Afghan working on an installation".
However, an Afghan official told the BBC in Kabul that the gunman was a rogue Afghan policeman who had opened fire during a row with foreign soldiers over access to a gym at the base.
A US defence official was quoted by AP as saying all three victims were Americans.
In Friday's other shooting, the police commander killed the three marines as they ate before dawn, in observance of the Muslim fasting season.
A US defence department official confirmed the dead Americans had belonged to Marine Special Operations Forces.
Taliban spokesman Qari Yousef Ahmadi told AP by telephone that the attacker had joined the insurgency after the shooting.
"Now, he is with us," the spokesman said.
Writing earlier on Twitter, an Isaf spokesperson said most attacks by members of the Afghan security forces on its personnel were caused by "personal grievances or stress".
"Those incidents do not reflect the overall situation in [Afghanistan], where hundreds of thousands of soldiers, Isaf and [Afghan], work together.
A British soldier from 3rd Battalion The Rifles was killed by "enemy action" while on patrol in the Nad-e-Ali district of Helmand on Thursday.
A soldier from 30 Armoured Engineer Squadron, 26 Engineer Regiment, died on Friday from injuries sustained during enemy action in the same district.