At least 79 people were killed and 81 wounded as they jammed the market to buy provisions on the eve of the Muslim day of rest and prayer.

The bombings formed a bloody backdrop to the swearing-in of Ryan Crocker as the new US ambassador to Iraq at the US embassy in Baghad's Green Zone.

Crocker pledged to stand by Nuri al-Maliki, Iraq's prime minister, and said that Iraq's parliament must push ahead with reconciliation efforts.

"This government, under the leadership of prime minister Maliki, must continue to take the necessary steps to unify this country, and to deliver tangible improvements to the lives of all Iraqis," he said.

Crocker replaces Zalmay Khalilzad, who left the country this week.

In the Khalis attack, the first two cars exploded in quick succession at about 6pm on Thursday near a busy market in the centre of the town.

Corpse trap

They were followed by a third car bomb 45 minutes later that was detonated about 500 metres away, police said.

Earlier, five people were killed and nearly 20 others wounded when a car bomb exploded in the town of Mahmudiya, 30km south of Baghdad, police said.

In the Iraqi capital, two policemen died and six were wounded when a car loaded with explosives and with a corpse inside blew up when they came to retrieve the body, a security official said.

Another two policemen were killed and two more wounded when armed men opened fire on a police convoy as it passed through a district in northern Baghdad near the Sunni al-Nida mosque, an official said.

Three more Iraqis were killed and another 20 wounded in a roadside bomb explosion in Baghdad's southwestern Baya district.

Sectarian tension

In Tal Afar, Durad Kashmula, the governor of Nineveh province, acknowledged a setback to the authorities' attempt to deal with the recent surge in sectarian violence.

Residents of Mahmudiya mournThursday's deaths [Reuters]

Hours after lorry bombs killed 85 people in a Shia area of the town on Tuesday, up to 70 Sunni men were shot dead.

Tal Afar, situated close to the Syrian border, was held up only a year ago by George Bush, the US president, as an example of progress towards peace.

On Thursday, Kashmula said at a news conference in Mosul: "Yes, there are policemen who are involved.

"They have been arrested but released afterwards due to demonstrations and to deter strife," he said, referring to the previous day's protests in Tal Afar.

Kashmula said they would be brought to justice in due course.

Brigadier Najim al-Jubouri, the mayor of Tal Afar, said that 18 people had been detained over the shootings.

It was not clear how many remained in custody on Thursday.

Salih Qadu, head doctor of Tal Afar hospital, said the bodies of 60 men shot in the aftermath had been brought to the hospital.