BAGHDAD - Two U.S. service members were killed and nine others were wounded when a Kurdish Iraqi soldier sprayed them with gunfire at an Iraqi army commando base north of Baghdad on Tuesday afternoon, Iraqi and U.S. military officials said.

The two Americans, whose names were being withheld until relatives are notified, were the first U.S. troops to be killed in Iraq since the Obama administration declared combat operations there officially over last week. The incident underscored the dangers facing the nearly 50,000 U.S. troops still in the country.

Details were murky Tuesday afternoon while the U.S. military investigated the incident. U.S. troops had escorted their commander to an afternoon meeting at an Iraqi army base in Tuz Khurmatu, 55 miles south of Kirkuk. During the meeting, a man in an Iraqi army uniform opened fire, the U.S. military said, adding that the assailant was shot dead at the scene.

It was unclear Tuesday whether the young shooter, whom Iraqi security officials identified as Soran Rahman Taleh Wali, a Kurdish member of one of the Iraqi army's special forces units, had planned the attack or acted spontaneously. His commander, Staff Col. Ghaleb al-Bayati, said Wali was playing volleyball with U.S. troops at the base when an argument escalated and Wali fired his weapon repeatedly, Bayati said.

"I'm not ruling anything out, but it seems pretty far-fetched that an altercation like this would be over a volleyball match," said Maj. Lee Peters, a military spokesman for U.S. forces in the north of Iraq. "We think this is an isolated incident, and it hasn't broken our trust with the Iraqi security forces."

Peters said Tuesday night that he could not confirm whether the shooter was an Iraqi soldier.

The attack was the second in three days on an Iraqi base where U.S. troops were present. On Sunday, a vehicle loaded with explosives detonated outside an Iraqi army headquarters in Baghdad, and at least four suicide bombers stormed the base, where several American service members are housed. Two gained entry before U.S. and Iraqi forces repelled the assault, which left at least 12 Iraqis dead, most of them soldiers.

In Jumhouriyah, Wali's neighborhood just a few miles from the base in Tuz Khurmatu, neighbors and family members would not speak about the 26-year-old on Tuesday, saying they feared repercussions.

The mostly Kurdish neighborhood had been the target of recent joint U.S. and Iraqi missions to root out members of a Sunni insurgent group, Ansar al-Sunna, said Col. Haywa Rasoul of the Tuz Khurmatu police. Tuz Khurmatu has a mixed Kurdish, Turkmen and Arab population. Some Iraqi security officials said the raids may have upset Wali, whom they described as short-tempered. Wali's brother is a police officer and his family is respected in the community, Rasoul said.

The U.S. military confirmed that U.S. troops had assisted in an Iraqi mission in the previous 24 hours to detain a man with a warrant out for his arrest, along with several other suspects. But it did not confirm the mission was related to Ansar al-Sunna.

"This is the first incident in which a Kurd killed Americans. We are worried that this might end the honeymoon between the Kurds and the Americans," a Kurdish security official said, speaking on the condition of anonymity because of the sensitivity of the subject. Kurdish Iraqis have been the most steadfast U.S. ally in Iraq.

Since the end of combat operations last Tuesday, U.S. troops in the north have fired only a few warning shots, the U.S. military said. This year, at least 20 service members have been killed in Iraq in hostile attacks, including in Tuesday's incident, according to iCasualties.org, a Web site that tracks military deaths in Iraq and Afghanistan. More than 4,400 have died since the war began in 2003.

"This is a tragic and cowardly act, which I firmly believe was an isolated incident and is certainly not reflective of the Iraqi Security Forces in Salah-ad-Din [province]," Maj. Gen. Tony Cucolo, commander of U.S. forces in northern Iraq, said in a statement.

Also Tuesday, a news anchor for the state television network al-Iraqiya was gunned down in the capital in what appeared to be part of an ongoing campaign of assassinations. Gunmen used pistols capped with silencers Tuesday morning to shoot Riyadh Jabbar al-Sarray. Al-Iraqiya declared three days of mourning and replaced their broadcast with his image.