Afghan soldiers and police officers have attacked their American and allied counterparts with increasing frequency in recent years. The assaults, once rare, have become common enough that they are widely referred to here, in shorthand, as "green on blue" attacks.

Officials from the NATO-led coalition blame personal differences, not Taliban infiltration, for most of the violence. Some fear that the distrust sown by such attacks is undermining a pillar of the Western exit strategy: preparing Afghan forces to fight on their own by pairing them closely with coalition troops.

Afghan police officers or soldiers have killed 26 coalition service members this year, compared with 35 in all of 2011, according to the coalition.

The latest shooting took place on Sunday in the southern province of Helmand, where the bulk of British forces in Afghanistan are based with a large number of American Marines.

The coalition, as is its custom, released only the barest of details in a written statement late Sunday. It said three service members had been killed but did not specify the location or their nationalities. It also identified the attacker as a man "wearing an Afghan National Civil Order Police uniform," leaving open the possibility that the assailant was a Taliban infiltrator, not a colleague.

But a spokesman for the Helmand provincial government, Daoud Ahmadi, said Monday that the attacker had been a member of the Civil Order Police and had been fatally wounded in a firefight with British soldiers.

The Civil Order Police is national constabulary force that often supports military operations. Western officials consider the force better trained and disciplined than the regular police force, which is riddled with corruption and drug abuse.

Britain's Defense Ministry said in a statement that the firefight between its soldiers and the Civil Order Police officer had taken place at a checkpoint in the Nahr-e Saraj district of Helmand. The soldiers were part of a team advising and training the police force, and they had traveled to the checkpoint from a larger base for a meeting, known in Afghanistan as a shura, with local elders.

As they left the shura, the attacker opened fire, and the three were wounded gravely enough that they could not be saved by first aid at the scene, the Defense Ministry said. The ministry did not identify the dead soldiers.

Col. Ghulam Sakhi, who commands the Civil Order Police in Helmand, said the shooting, around 5 p.m., came at the end of an argument between British soldiers and the Afghan police.

Coalition and Afghan officials said the attack was under investigation. It was not clear whether each side was running its own inquiry or a joint effort was under way.

On Monday evening, a suicide car bomb exploded in a residential neighborhood on the northern side of Kandahar, the main city in southern Afghanistan, killing at least seven civilians and wounding 23, said Javed Faisal, a spokesman for the governor of Kandahar Province.

Mr. Faisal said the authorities were uncertain whom or what the bomber was targeting; no Afghan, American or allied forces or senior government officials were in the area. He speculated that the explosives might have gone off accidentally.

Taimoor Shah contributed reporting from Kandahar, Afghanistan, and Alan Cowell from London.