An Iraqi soldier opened fire on U.S. troops after a quarrel broke out today in northern Iraq, killing two American soldiers and wounding six in a military compound before he was shot to death, officials said.

BAGHDAD — An Iraqi soldier opened fire on U.S. troops after a quarrel broke out today in northern Iraq, killing two American soldiers and wounding six in a military compound before he was shot to death, officials said.

The shooting took place as a series of bombings shook Baghdad for the third consecutive day, killing 23 people and wounding about 90, police said.

In the face of newly heightened violence in Baghdad, the Iraqi military said it was taking measures to curb "the increasing number of terrorist attacks" in the city.

Military spokesman Maj. Gen. Qassim al-Moussawi said the measures would include stepped up intelligence gathering and pre-emptive strikes on suspected extremists.

The U.S. military said the attack on the American soldiers occurred in an Iraqi army compound in Mosul, which has been the focus of intensive joint U.S.-Iraqi operations against al-Qaida in Iraq.

Air Force Tech. Sgt. Chris Stagner said the assailant was believed to be an Iraqi soldier, but the U.S. military confirmed no other details pending an investigation.

The Iraqi soldier opened fire on the Americans after a quarrel broke out between them in a volatile Sunni neighborhood in central Mosul, Iraqi Defense Ministry spokesman Maj. Gen. Mohammed al-Askari said.

He said the Americans then killed the Iraqi soldier, who was identified as Barzan al-Hadidi.

It was the second such shooting in Mosul in a year.

In Baghdad, the first car bomb ripped through a bustling section of downtown Baghdad during this morning's rush hour, killing four people and injuring 15. The blast occurred off Nasir Square in the heart of the city — a busy neighborhood of shops, pharmacies and photography stores.

A second car bomb exploded near a secondary school in the Shiite-dominated neighborhood of Shaab in north Baghdad. Iraqi police said five people were killed and 12 wounded.

Two bombs blew up within moments of each other in the Shiite district of New Baghdad, with the second explosion occurring just after police arrived to investigate the first.

It was not immediately clear how many were killed in each explosion, but police and hospital officials gave an initial total of 14 dead, including three children and two women.

Hassan Rahim, a 42-year-old barber who lives in the neighborhood, heard the blasts as he fixed his rooftop satellite dish.

"I do not know why Iraqi officials keep talking about the improving security in Baghdad everyday. We are fed up with such lies and we will hope that the security file in the capital will not be handed over to Iraqi government," he said.

Today's attacks underscore the challenge facing the Iraqi security forces as they take a leading role in providing security and the U.S. military pulls back.

Today's attacks follow two days of morning rush hour blasts in Baghdad that have killed more than 30 people and wounded some 70 others.

The recent uptick in bombings has occurred despite security gains in recent months that have seen violence drop sharply in the capital. Many of the attacks have targeted Iraqi police and army patrols, as well as government officials heading to work and commuters.

In the first nine days of November, there were at least 19 bombings in Baghdad, compared with 28 for all of October and 22 in September, according to an Associated Press tally.

The rise in attacks also comes as U.S. and Iraqi officials try to hammer out a final agreement on a security deal that would keep U.S. troops in Iraq until the end of 2011.

———

Associated Press writers Sameer N. Yacoub and Saad Abdul-Kadir contributed to this report.