The mosque dominated the Samarra skyline
Over the centuries, the central Iraqi city of Samarra has attracted millions of Shia pilgrims from all over the Muslim world.
They travel to the city to worship at the sacred tombs of Ali al-Hadi and al-Hasan al-Askari, the 10th and 11th Shia Imams, and the site where the 12th Imam, Mohammed al-Mahdi, disappeared.
Imam al-Mahdi, known as the "hidden Imam", was the son and grandson of the two previous imams, and Shias pray at the mosque for his return.
The al-Askari shrine was built with a huge, dazzling golden dome and two golden minarets.
In February 2006, the dome was blown up in a dawn raid. The attack - which was blamed on Sunni militants - was widely believed to have set off a continuing spiral of sectarian violence in which many thousands died.
Shia Islam was led by imams, believed to be divinely appointed from the Prophet Muhammad's family, until the late 9th Century.
Al-Hadi, the 10th Shia Imam, was born in Medina in modern-day Saudi Arabia in 827. He became Imam at the age of six.
In 848, he and his son were brought to Samarra, then the capital of the Abbasid Empire and placed under house arrest by the Caliph al-Mutawakkil.
It is believed Imam al-Hadi was poisoned in 868, and buried in a house near the original mosque of al-Mutasim.
Al-Askari succeeded his father as imam, but remained under house arrest until his death in 874. He was buried beside his father in what was later to become the al-Askari shrine.
In addition to the tombs of the two imams, are those of Hakima Khatun, the sister of Imam al-Hadi, and Narjis Khatun, the mother of Imam al-Mahdi.
The huge complex also contains a second shrine above the cave (sirdab), where the young Imam al-Mahdi, Al-Askari's son, was said to have been hidden before he disappeared in 878.
Shia Muslims believe he did not die and still await his return more than 1,100 years later.
Visitors descend stairs to enter the sirdab, which bears an 800-year-old inscription from the Abbasid Caliph Nasser al-Din Allah.
The huge complex was first developed during the 10th and 11th Centuries by the Shia Hamdanid and Buyid dynasties, and soon became an important place of pilgrimage.
The complex was rebuilt several times, most recently in 1905, when a gold-plated dome was erected above the tomb of the two imams. The dome was covered by 72,00 golden pieces and measured roughly 20m wide and 68m high.
A blue-tiled dome also marks the sirdab where Imam al-Mahdi disappeared.
Robert Hillenbrand, the professor of Islamic Art at Edinburgh University, told the BBC that the shrine may not be of enormous architectural importance, but is of immense spiritual importance for hundreds of millions of Shia Muslims.
In a Christian context, he said, the shrine would equate in spiritual importance to the burial place of St James at Santiago de Compostela.
"Pilgrimage to such shrines, of which the majority are in Iraq, is an absolutely integral part of their religious life," he added.
The other three major Shia shrines in Iraq are Najaf, Karbala and Kadhimiya in Baghdad.