The Mausoleum is formed around the grave of the famous theologian, scholar theologian (mutakallim), linguist, scholar of hadith, Muslim jurisprudence (fiqh) and the poet Muhammad ibn Ali, Abu Bakr al-Qaffal al-Shashi (904-976). He is particularly famous as a connoisseur and promoter of the Shafi’i law – and one of the Sunni schools of thought. He was educated in Bukhara, Baghdad, Nishapur, and other cities of the Islamic world. He learnt from famous theologians of his time, At-Tabari (died 923), Abu Bakr ibn Khuzaymah (died 933) etc.
Qaffal al-Shashi is one of the most respected saints of Tashkent. His burial place was almost the only relic of the city until the XIV century. According to the local legend, the Imam al-Shashi led his genus to “Lord of the Imam” (Hazrat-i Imam), beside who he was buried.
This circumstance gave the name to the whole complex, remembered in a slightly modified form “Hast Imam”. According to other later manuscript versions, Imam ash-Shashi was linked with Muhammad ibn al-Hanafi, known as Iskhaq Bab (or Ishaq at-Turk).
The modern mausoleum (in place of the destroyed old one) was not built before the 14th century. However, it was repeatedly repaired. One of the biggest repairs (which actually turned into reconstruction of the mausoleum) was performed in 2007, in connection with renovation of Hasti-Imam complex, the mausoleum was renovated again. Remains of dedicatory inscription about the repairs of the 16th century were brought down and replaced by the fragment from the Koran. In the place of missing parts of the Persian poetry verses there are written poems in Uzbek.