The mosque was first built according to the vision of Abbasid Caliph al-Nasir in an area called "Souq al-Sultan locality" which was close to Bab al-Sultan (now called
Bab al-Muazzam). The mosque was mentioned by Islamic historian
Sibt ibn al-Jawzi in his writings. In the year following the death of Caliph al-Nasir, his son,
al-Zahir, succeeded the title of Caliph and built a library in the mosque as well as transferring many
Qur'ans in the mosque. The mosque continued to play an important role even after the Mongol siege of Baghdad and evidence of this can be found in
Ibn al-Fuwati's work where he mentioned that he was an
Imam at the mosque at one point. . After the Ottoman conquest of Baghdad, Sultan
Suleiman the Magnificent carried out a reconstruction of the mosque in 1533. In 1683, Ottoman
Grand Vizier Ibrahim Pasha carried out a second reconstruction of the mosque as well as the
Syed Sultan Ali Mosque. A century later between 1704 and 1723,
Hassan Pasha, Governor of the
Baghdad at the time and founder of the
Mamluk state of Iraq, reconstructed the mosque in its current wide form and was named the "
New Hassan Pasha Mosque" in his honor. The mosque at this time was also located opposite of the Baghdadi government palace. It was one of the most well-known mosques in al-Rusafa and included a
madrasa as well as slender domes and a lofty minaret. After the independence of the Kingdom of Iraq, several minor changes and reconstructions took place including that one of its doors leading to the alley behind it was closed, and that the teaching department that was in it was abolished. Today, the mosque is located near
al-Qushla and the mosque was at one point called the "King’s Mosque" because all the kings of Iraq prayed in it during the royal era. ==Description==