An army lieutenant was among those killed and another soldier was wounded in the late Monday night ambush, a military official and a policeman said.
The attack was a sobering reminder of how vulnerable Iraqi security forces remain as the U.S. military starts to leave.
On Tuesday, Iraqi troops were searching for the gunmen in and around the town of Haditha in the western Anbar province, 140 miles (220 kilometers) northwest of Baghdad.
In the Iraqi capital, two government officials said U.S. authorities informed Prime Minister Nouri al-Maliki that the American military withdrawal has officially begun.
The notice, given on the day that parliament returned to work after a recess for the holy Muslim month of Ramadan, puts pressure on Iraqi leaders to decide quickly if they will ask some U.S. troops to stay.
All officials spoke on condition of anonymity because they were not authorized to release the information.
Under a 2008 security agreement between Washington and Baghdad, all U.S. troops are slated to leave by Dec. 31, 2011. But continued instability and fear of growing Iranian influence in Iraq has prompted some Iraqi and U.S. officials to reconsider the deadline.
However, keeping U.S. troops in Iraq -- even just to train their nascent security forces -- after more than eight years of war is widely unpopular among Iraqis, whose leaders are weighing whether the security risks are worth the political backlash.
The decision is expected this fall. There are about 46,000 U.S. troops currently in Iraq.
U.S. officials in Baghdad did not immediately respond to a request for comment.