An Iraqi soldier apparently angry at perceived insults opened fire Wednesday on U.S. troops in the northern city of Mosul, killing two Americans and wounding six others before dying in a hail of gunfire.

In Baghdad, bombers struck the capital Wednesday for a third straight day, killing 23 people and wounding scores in a string of attacks in mostly Shiite areas of the city.

A U.S. military statement said the shooting occurred on an Iraqi army compound in Mosul, 225 miles northwest of Baghdad and "initial reports indicate the attacker was an Iraqi soldier" who was killed by return fire.

Iraqi Defense Ministry spokesman Maj. Gen. Mohammed al-Askari said an Iraqi soldier opened fire on the Americans at an Iraqi base in a volatile Sunni Arab neighborhood in central Mosul.

The soldier, identified as Barzan al-Hadidi, was killed by other American soldiers, the spokesman said.

It was the second such shooting in Mosul in a year, raising questions about the professionalism and preparedness of Iraqi security forces and their relations with their American partners.

Last December, an Iraqi soldier allegedly shot and killed a U.S. captain and a sergeant during a joint operation in Mosul, where Al Qaeda and other Sunni insurgent groups still operate.

Tensions are running high in Mosul, where U.S. and Iraqi troops have been trying since last spring to rout insurgents from Iraq's third largest city. The military campaign has also raised friction between the Arab population and Kurdish soldiers of the Iraqi army sent there to help restore order.

Also in Mosul, two Christian sisters were killed and their mother was wounded in an attack on their home Wednesday, police said. When Iraqi army soldiers rushed to the scene, a roadside bomb exploded, wounding three of them, police said.

As violence raged in Mosul, a string of bombings rocked Baghdad for the third consecutive day, killing 23 people and wounding about 90, police said. The Iraqi army acknowledged the rise in attacks and 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 first car bomb blew up in a bustling section of downtown Baghdad during the Wednesday morning rush hour, killing four people and injuring 15. The blast occurred off Nasir Square, a mostly Shiite area in the heart of the city.

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. A roadside bomb wounded seven people in another part of Shaab, police said.

Two bombs blew up within moments of each other Wednesday evening in the mostly 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.

Wednesday's attacks follow two days of rush hour blasts in Baghdad that have killed more than 30 people and wounded some 70 others. The violence underscores the challenge facing the Iraqi security forces as they take a leading role in providing security and the U.S. military pulls back.

The recent uptick in bombings has occurred despite security gains in recent months that have seen violence drop sharply in the capital.

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. Parliament must approve the deal by the end of the year when the U.N. mandate authorizing the U.S. presence expires.

But the proposed agreement has drawn sharp criticism, especially within the majority Shiite community. Without an agreement or a new mandate, the U.S. military would have to cease operations in Iraq.

Iraq's two neighbors Syria and Iran have also spoken out against the agreement. The U.S. accuses both countries of supporting or harboring Iraqi extremists opposed to the U.S.-backed government of Prime Minister Nouri al-Maliki.

Moreover, an Internet monitoring service reported Tuesday that 10 Iraqi insurgent groups have agreed to escalate attacks against U.S. and Iraqi forces to derail the proposed deal, which they branded "the agreement of disgrace."

The campaign was announced Nov. 4 in an audio speech by Sheik Abu Wael, a top leader of the Sunni militant Ansar al-Sunnah, who invited other insurgent groups to join, the SITE Intelligence Group said.

"Such kinds of agreements are not negated by mere statements of condemnation and denunciation," the sheik said. "Rather, there is necessity for work, jihad, fighting those forces the enemy and those who are loyal to them to recant this agreement"

In his speech, the sheik invited over 15 factions to join. Most of them posted statements accepting the invitation, SITE said.

Ansar al-Sunnah was established in September 2003 and is believed to have links to Al Qaeda in Iraq. It claimed responsibility for the Dec. 21, 2004 homicide bombing of a U.S. dining hall in Mosul which killed 24 people, including 14 U.S. soldiers.