Al-Khwarizmi also built a school near the mosque, named the Great Imam School, for teaching the Hanafi madhab.
Later, in 459 AH / 1066 CE, the Grand Vizier of the Seljuk Emperor Alp Arslan, Abu Saad al-Khwarizmi or al-Mustawfi, built a shrine for Abu Hanifa in the mosque, along with a white Dome.