By the beginning of the 18th century, Baghdad under
Ottoman rule had an extremely disorganized political system and order. The
Janissaries were effectively the masters of the city with various
Arab tribes controlling the surroundings of
Ottoman Iraq. Trade and peace suffered. Baghdad and Basra were placed in the salyane system where taxation was farmed out to the governors. Constant war with the Iranian
Safavid Empire had weakened Ottoman control further. By the 1700s the situation had worsened. The area suffered from being the battleground between the Ottoman and Safavid empires. As such, Hassan Pasha was appointed governor in 1704 by
Constantinople to bring stability to the region. Born in 1657 to a
sipahi of
Murad IV, Hassan Pasha was well educated and had distinguished himself in various
eyalets across the Empire. Pasha, along with his son Ahmad, began their careers fighting Iranian forces and defending the area from
Nader Shah's control and had even fought deep into Iranian territory such as in
Kermanshah. On 16 June 1704, Hassan Pasha officially became the Vali of Baghdad and immediately became popular among Baghdadis. Accounts of this struggle are well documented in Iraqi chronicles of the era, as are many battles in the period. After this, Hassan began building houses and schools and provided new job opportunities for Baghdadi
Sunni Muslim scholars to study in them. His son, Ahmad Pasha, would follow his father's examples. Hassan Pasha took an interest in the Islamic shrines of
Najaf and
Karbala. In 1705, he made a visit to Karbala to visit the
Imam Husayn Shrine, which included the resting place of
Husayn ibn Ali. He also visited
al-Abbas Shrine, which contained the resting place of
al-Abbas bin Ali, brother of Husayn. Hassan chose Karbala as a starting point for his restoration of the cities which he now ruled. He ordered the channels of Karbala to be cleaned, and restored the Khan al-Hammad Castle, which is a
khan (caravanserai) located on the road between Karbala and Najaf. , also known as Hassan Pasha Mosque Hassan Pasha's rule in Iraq brought a new era of stability. In Baghdad, he trained and introduced both Circassian and Georgian Mamluk troops to keep the janissaries in check and protect the city from possible Iranian threats. This effectively laid the foundation of the Mamluk dynasty's rule over Iraq which lasted until 1831. Order was restored under Hassan Pasha. Notably, Hassan Pasha abolished taxes on firewood and foodstuffs and ordered many construction projects. This includes the construction of many houses, inspired by his own background, and the renewal of the ancient Abbasid
al-Sarai Mosque, which would be given a new nickname, the
New Hassan Pasha Mosque. The locality where Hassan Pasha established his administration and al-Sarai Mosque is also located was given the name "
New Hassan Pasha locality" in his honor. == Family and death ==