BAGHDAD - A suicide bomber killed eight Shiite pilgrims and wounded more than 50 others Thursday, a police official said. It was the second deadly attack on pilgrims in as many days.

The suicide bomber joined the procession near the Imam Hussein shrine in the Shiite holy city of Karbala and then detonated an explosive belt filled with nails, said the official.

A medical official in Karbala confirmed that eight pilgrims were killed and 52 injured in the attack.

Both officials spoke on condition of anonymity because they were not authorized to talk to the media.

On Wednesday, bombs struck Shiite pilgrims in Baghdad, killing at least 12 people and wounding over 40.

Hundreds of thousands of Shiite pilgrims are converging in Karbala to mark Monday's end of 40 days of mourning that follow Ashoura, the anniversary of the seventh-century death of the Prophet Muhammad's grandson Hussein.

He was killed in a battle for the leadership of the nascent Muslim nation following Muhammad's death in 632. He's revered by Shiites because he is the son of Ali, the man they believe should have been the direct successor to the prophet.

Attacks by Sunni and Shiite extremists have killed hundreds of people during pilgrimages in recent years.

Although violence has fallen significantly in Iraq, extremists have continued to target religious processions, hoping to trigger the kind of sectarian violence between Sunnis and Shiites that consumed the country in 2006 and 2007.

The attacks occurred even though the government stationed tens of thousands of Iraqi security forces along the routes leading to Karbala.

More aggressive government security efforts and the surge in U.S. troops in 2007 have been credited with reducing violence in Iraq to a five year low. The Iraqi government launched several operations against Sunni and Shiite extremists in 2008, significantly weakening them.

But many Sunni extremists are believed to have fled north after being driven from Baghdad and central Iraq, increasing violence in the city of Mosul, which U.S. officials describe as al-Qaida's last major urban stronghold in the country.

A parked car bomb killed four policemen and wounded three people in Mosul on Thursday, the latest in a string of recent attacks in the city, said a police official, speaking on condition of anonymity because he was not authorized to talk to the media.

The car bomb targeted a police patrol in eastern Mosul and the wounded included one policeman and two civilians, said the official.

Political officials have also been targeted in Mosul. Three unidentified gunmen killed a local Sunni official in the city on Thursday, said a second police official, also speaking on condition of anonymity for the same reason. Abdul-Kareem Khalaf al-Sharabi, deputy chief of the National Dialogue Front in Mosul, was gunned down near his house in western Mosul, he said.

Periodic attacks have continued in other areas of Iraq as well. Two bombs hidden in garbage cans in the central Iraqi city of Baqouba exploded almost simultaneously Thursday, wounding three people, said a police official. A third bomb was defused in the same area, he said, speaking on condition of anonymity because he was not authorized to talk to the media.

Also Thursday, a top Iraqi official confirmed that Iraq is holding four former detainees from the Guantanamo detention facility to see whether they pose a threat.

Acting Justice Minister Safaaulddin al-Safi told The Associated Press that a judge has approved their continued detention for two weeks while authorities interrogate and investigate them.

The four were arrested in Afghanistan and held at Guantanamo before being handed over to the Iraqis last month.

Al-Safi said the four were not wanted for crimes in Iraq but authorities want to make sure they pose no threat if set free.

President Barack Obama has ordered the detention center in Cuba to be closed within a year as part of his overhaul of U.S. national security policy.