Women and children were among those killed in a group of pilgrims headed to the shrine in Samarra for Friday ceremonies marking the death of Shiite Islam's 11th imam, a ninth-century successor to the Prophet Muhammad.
The al-Askari mosque became the epicenter of Iraq's worst violence. Sunni insurgents wearing uniforms set off two bombs in February 2006 that destroyed the site in a provocation that unleashed Shiite militiamen who hunted down Sunni clerics and attacked mosques in retaliation - the beginning of years of intensified bloodletting in Iraq.
Thursday's attack took place about 10 miles, or 16 kilometers, away on a road to the shrine from the town of Dujail.
The dead and wounded were left scattered around a scorched car.
"The wounded were running and asking to be taken to hospitals; children were crying in panic," said a witness who identified himself only as Abu Jalal. "There was blood everywhere. The scene was disastrous."
The blast killed eight and wounded more than 40 people, said Dujail's mayor, Amir Marhoun.
The Samarra shrine, about 60 miles (95 kilometers) north of Baghdad, is still under reconstruction. Its dome has been rebuilt, but it's not yet wrapped in gold.
Its destruction in 2006 sent Iraq into a downward spiral of violence between Sunnis and Shiites that left whole neighborhoods around the country cleansed and divided by sect. The day after the 2006 attack, nearly 140 people were killed, and tens of thousands died over the next two years as Iraq teetered on the brink of civil war.
The site contains the tombs of the 10th and 11th imams - Ali al-Hadi, who died in 868, and his son Hassan al-Askari, who died in 874. Both are descendants of the Prophet Muhammad, and Shiites consider them to be among his successors.
Imam Hassan al-Askari is the father of Imam Mohammed al-Mahdi, a Shiite saint known as the "Hidden Imam" who disappeared in the ninth century. The faithful believe the Hidden Imam will one day return to usher in peace and harmony in the world.
Iraqi and foreign officials in Baghdad have long lamented the vulnerability of Shiite pilgrims, many of whom walk in large groups and on dangerous highways to get to shrines where they pay homage to the many religious ceremonies that Shiites observe each year.
The pilgrimages are relatively new for Iraq, as they were largely forbidden when dictator Saddam Hussein, a Sunni, ran the country.
Last month, 56 Iraqis were killed - most of them pilgrims - in a triple suicide bombing at highway checkpoints on the way to ceremonies in Karbala, another holy city located 55 miles (90 kilometers) south of Baghdad. The attacks have spurred widespread criticism of Iraqi security forces for not protecting the pilgrims.
They also come at a delicate time for Iraq's government as Prime Minister Nouri al-Maliki seeks to prove that the nation's security forces are ready to safeguard the country alone when American forces leave at the end of the year.
Associated Press writers Bushra Juhi in Baghdad and Sameer N. Yacoub in Amman, Jordan, contributed to this report.