The Imam Reza Shrine (Persian: حرم امام رضا) in Mashhad, Iran is a complex which contains the mausoleum of Imam Reza, the eighth Imam of Twelver Shi'ites. It is the largest mosque in the world by dimension and the second largest by capacity. Also contained within the complex are the Goharshad Mosque, a museum, a library, four seminaries, a cemetery, the Razavi University of Islamic Sciences, a dining hall for pilgrims, vast prayer halls, and other buildings.
In 818, Imam Ali al-Ridha was murdered by the Abbasid caliph al-Ma'mun (ruled 813–833) and was buried beside the grave of al-Ma'mun's father, Harun al-Rashid (r. 786–809). After this event, the location was called as Mashhad al-Ridha ("the place of martyrdom of al-Ridha"). Shias and Sunnis began visiting his grave on pilgrimage. By the end of the 9th century a dome was built on the grave and many buildings and bazaars sprang up around it. During more than a millennium it has been devastated and reconstructed several times.
In 993 the holy shrine was ruined by Saboktakin, a Ghaznavid king. However, in 1009, his son Sultan Mahmud of Ghazni ordered the shrine to be repaired and expanded. About 1150 Sultan Sanjar, a Seljuq king, renovated the sanctuary and added new buildings after his son was miraculously healed at the shrine. Later, Sultan Muhammad Khodabande, an Ilkhanate king who converted to Shiism, renovated the holy shrine around 1310. The celebrated Muslim traveler Ibn Battuta visited Mashhad in 1333 and reported that it was a large town with abundant fruit trees, streams and mills. A great dome of elegant construction surmounts the noble mausoleum, the walls being decorated with colored tiles. Opposite the tomb of the Imam is the tomb of Caliph Harun al-Rashid, which is surmounted by a platform bearing chandeliers. However, the tomb of Harun al-Rashid is not considered sacred, as he was responsible for the murders of the 6th and 7th Shia Imams.
In the 15th century, during the reign of the Timurid Shahrukh Mirza, Masshad became one of the main cities of the realm. In 1418 his wife Goharshad funded the construction of an outstanding mosque beside the shrine, which is known as the Goharshad Mosque