The attack took place during a meeting between an American company commander, with his retinue of security guards, and Iraqi soldiers at a small base described as a commando compound near the city of Tuz Khurmato in Salahuddin Province.

During the meeting an Iraqi soldier fired on the Americans and was himself shot and killed, the American military said in a statement.

Both attacks involved American soldiers active in what is now their main mission: advising Iraq’s security forces. And both showed the inherent risks of doing that job in a country still ravaged by daily violence and protected by security forces of uncertain professionalism, training and discipline.

Though the exact circumstances of Tuesday’s fight remain unknown, the meeting between the company commander and Iraqi forces at the base near Tuz Khurmato is typical of those that take place each day at army and police bases across Iraq.

“This is a tragic and cowardly act,” the senior American commander in northern Iraq, Maj. Gen. Tony Cucolo of the Third Infantry Division, said in the statement, “which I firmly believe was an isolated incident and is certainly not reflective of the Iraqi security forces” in the province.

The military did not identify the soldiers killed and wounded, or their unit, pending the notification of their next of kin. The military provided few other details, but said an investigation into the firefight had begun.

An error has occurred. Please try again later.

You are already subscribed to this email.

A spokesman for Iraq’s Ministry of Defense, Mohammed al-Askari, identified the Iraqi soldier as Soran Rhaman Falih Wali and the unit as the Fourth Division of the Iraqi Army. He also said an investigation would be conducted.

Niazi Uklo, a member of the provincial council in Salahuddin, said in a telephone interview that the soldier, a Kurd, opened fire after a dispute broke out during the meeting on the base.

“There was a struggle between an Iraqi Army solider and an American soldier,” Mr. Uklo said. “It escalated into a brawl and ended when the Iraqi soldier opened fire.”

American military casualties in Iraq have dropped precipitously since the invasion in 2003, reflecting the withdrawal of tens of thousands of troops and the end of offensive combat operations, a process that began, effectively, many months before Mr. Obama’s own deadline for ending combat by Sept. 1.

So far this year, 48 Americans have been killed here, compared with 149 in 2009 and 904 in 2007, the deadliest single year for American troops in Iraq, according to icasualties.org.

Most of the deaths this year have involved accidents or suicides, but combat casualties still occur, and in recent weeks there has been an increase in attacks in Iraq generally and against American bases and the American Embassy in Baghdad specifically.

Three American soldiers were killed in August, all by hostile fire in Basra, Baquba and Iskandariya, a small town south of Baghdad.

Omar al-Jawoshy contributed reporting.

A version of this article appears in print on September 8, 2010, on Page A10 of the New York edition with the headline: Iraqi Soldier Opens Fire, and 2 G.I.’s Die. Order Reprints|Today's Paper|Subscribe