Ali Rıza Pasha (sometimes spelled Ali Ridha Pasha) led the Ottoman army in 1831 against the mamluk governor in Baghdad after Dawud Pasha refused to give up his office. Ali Rıza Pasha captured the city and Dawud ending the mamluk rule in Baghdad. Baghdad fell in September 1831 after a ten-week-long blockade of the city which caused mass famine.
While Ali Rıza Pasha was able to capture Baghdad and unseat Dawud Pasha, he still had to deal with the mamluks who remained in Baghdad. In order to preserve his power and pacify the mamluks, he gave many of them positions in his government. In the days following his conquest of Baghdad, Ali Rıza Pasha published a firman, or decree, which made him the governing authority over the cities of: Baghdad, Aleppo, Diyarbakr, and Mosul. The firman eventually covered all cities in Iraq.
Ali Rıza Pasha then marched his army south to Basra where he occupied the province ending mamluk rule in 1834. Ali Rıza Pasha's conquest of Baghdad and Basra brought the provinces under direct rule from Istanbul and subjected them to Tanzimat reforms. Ali Rıza Pasha replaced mamluk governor Dawud Pasha and exiled him to Brusah. After Dawud's departure from the city, Ali Rıza was credited with the return of trade and end to crime. For a short time he was able to control the mafia that was able to control these regions and especially Karbala in the vacuum of a region without government. He promised appointments and estates to mamluk notables and continued past privileges of the East India Company.
In the summer of 1835, Ali Rıza Pasha attempted to attack the town of Karbala with an army of 3,000. Karbala is an important shrine town in Iraq because Imam Husayn, the grandson of the Prophet Muhammad, is buried there. Karbala is also economically significant because it may levy taxes on pilgrims and earns a significant profit for the local government. Ali Rıza Pasha was unable to keep control of Karbala however. Although he was a member of a Shiite-influenced Bektashi order and sympathized with Iraqi Shiites generally, Rıza Pasha was opposed by the so-called Shiite mafia in Karbala over the appointment of the towns governor. The problems in Karbala were heightened by pressure from the British Empire, who wanted to remain the imperial power of the Awadh government, and the essential link in the Iraqis' communication to the outside world. The serial governor Izzet Ahmed Pasha married his daughter, becoming his son-in-law.