Updated

A homicide bomber attacked a crowd of people waiting outside a heavily guarded court building in Baghdad on Thursday, killing 10 Iraqis and wounding 52, police said. Two U.S. soldiers also died in a roadside bomb attack.

Police first said the attack near the court was caused by a car bomb targeting a police convoy, but later said it was caused by a man with explosives hidden under his clothing.

The man detonated them off in a crowd of police officers and civilians waiting outside the civil court, said police Lt. Thair Mahmoud. The officers were guarding the building and many of the civilians were meeting just outside it with paralegals writing the petitions the civilians planned to submit to the court.

Countrywatch:Iraq

The blast occurred at 9:45 a.m. on Palestine Street, a major road in a mixed Sunni-Shiite area of eastern Baghdad, said. It was powerful enough to smash the windows of nearby shops.

Firefighters rushed to the scene and used hoses to clean bloodstains from the sidewalk and street outside the court. Mahmoud said all the casualties were civilians, except for two wounded policemen.

The roadside bomb that killed the two U.S. Army soldiers exploded about two hours later in south-central Baghdad, the military said.

The attack raised to at least 2,409 the number of members of the U.S. military who have died since the beginning of the war in 2003, according to an Associated Press count.

Shootings in Baghdad and other areas, and a roadside bomb south of the capital, also killed eight Iraqis, including a Shiite tribal leader and an Iraqi army officer, police said.

In Ramadi, police Lt. Ahmed al-Dulaimi and Dr. Ali al-Obeidi at Ramadi General Hospital said U.S. aircraft bombed two houses, killing 13 Iraqis and wounding four. But the U.S. military said it had no information about such an attack in Ramadi, 70 miles west of Baghdad.

U.S. Army Sgt. Dan Schonborg, of the 1st Battalion, 506th Infantry Regiment, said no coalition aircraft launched bombing runs in Ramadi on Thursday.

U.S. officers said there were sporadic exchanges of fire in Ramadi on Thursday, and two Iraqi soldiers were wounded.

Ramadi, populated by Sunni Arabs, is the most dangerous city in Iraq for U.S. forces. Commanders say there are more insurgent attacks there than anywhere else in the country, with militants and U.S. troops exchanging fire several times a day — at least.

On Wednesday, the corpses of 43 Iraqis were found in the streets of Baghdad and other cities, according to the Interior Ministry. They were apparent victims of death squads that kidnap civilians of rival Muslim sects, torture them, and dump their bodies.

Lately, Iraq's violence has shifted mainly from attacks by insurgents on U.S. and Iraqi forces to carefully targeted murders of Iraqi. Such sectarian violence by death squads targeting Shiite and Sunni civilians sharply increased after the Feb. 22 bombing of a Shiite shrine in Samarra, 60 miles north of Baghdad.

Sunni-led insurgents also have been boldly attacking fellow Sunnis who cooperate with the U.S.-backed Iraqi government by joining Iraq's military or its police forces.

On Wednesday, a suicide bomber cloaked in explosives killed two policemen and 13 police recruits in Fallujah, a city surrounded by U.S. Marine checkpoints. In a nearby town, three newly recruited Sunni soldiers from the U.S.-trained Iraqi army were found slain.

The suicide attack outside the main police station in Fallujah occurred a day after the governor of Anbar province, which includes Fallujah, narrowly escaped assassination. A suicide bomber blew up his vehicle near Gov. Maamoun Sami Rashid al-Alwani's convoy in Ramadi, killing 10 people. He was not injured, U.S. officials said.

U.S. and Iraqi officials have been urging Sunni Arabs to join the police and army, which has been dominated by the rival Shiite Muslim sect and ethnic Kurds. Sunni community leaders say the presence of Shiite and Kurdish troops in their areas raises sectarian tensions and undermines confidence in the government.

Training and recruiting Sunni Arab police and soldiers is part of a broader strategy by U.S. and Iraqi authorities to establish a political role for selected Sunni insurgent groups. The goal is to split more moderate elements from the Saddam Hussein's fanatic loyalists and extremists such as al-Qaida in Iraq, led by Abu Musab al-Zarqawi.

Meanwhile, the formation of Iraq's new government continues.

Prime Minister-designate Nouri al-Maliki, a Shiite, has said he intends to finish appointing his Cabinet by late next week.

To do that, he must balance the demands of the country's religious and ethnically based parties for key ministries, including oil, defense and interior.

Ensuring all groups a stake in the new government may require the Shiites, who hold 130 of the 275 seats in parliament, to give minority Sunni Arabs and Kurds more posts than they would expect based on their showing in the Dec. 15 legislative elections.