Updated

A gunman wearing an Iraqi army uniform opened fire on a U.S. military team Saturday, killing two American soldiers and wounding three others at a combat outpost in northern Iraq, the military said.

A military statement said the attacker was killed after the ambush-style assault 12 miles south of Mosul, which is one of the last urban strongholds for Sunni insurgents.

In the past, attackers have used military and police uniforms to bypass checkpoints and gain access to heavily guarded bases.

The U.S. statement gave no other information on the attack, but Iraqi military officials said the gunman was a Sunni Muslim cleric assigned to an Iraqi army unit.

The officials spoke on condition of anonymity because they were not authorized to speak to the media.

The attack could elevate worries about militant infiltration in Iraqi security forces as the U.S. military turns over more responsibilities in a phased withdrawal process before all American forces leave at the end of 2011.

In late February, two Iraqi police officers in Mosul opened fire on a visiting U.S. military team, killing one American soldier and an interpreter. The gunmen remain fugitives.