The Mamluk ruling elite, composed principally of Georgian and Circassian origin from Caucasian officers,[4][5] succeeded in asserting autonomy from their Ottoman overlords, and restored order and some degree of economic prosperity in the region.
The reign of Sultan Ahmed III (1703–30) was marked by relative political stability in the capital and by extensive reforms—some of them influenced by European models—implemented during the Tulip Period by Grand Vizier İbrahim Pasha.
Hassan's son and successor, Ahmad (Georgian: აჰმედ ფაშა), continued to recruit the Mamluks and promoted them to key administrative and military positions.
Both Hasan and Ahmad rendered a valuable service to the Ottoman Porte by curbing the unruly tribes and securing a steady inflow of taxes to the treasury in Constantinople as well as by defending Iraq against yet another military threat from the Safavids and Afsharids of Iran.
However, Ahmad's son-in-law Sulayman Abu Layla, already in charge of Basra, marched on Baghdad in the head of his Georgian guard and ousted the Ottoman administrator, thereby inaugurating 84 years of the Mamluk rule in Iraq.
They failed, however, to secure a regular system of succession and the gradual formation of rival Mamluk households resulted in factionalism and frequent power struggles.
The Porte hastened to exploit the crisis and replaced Omar Pasha (Georgian: ომარ ფაშა) with a non-Mamluk, who proved incapable of keeping order.
He fostered economy and continued to encourage commerce and diplomacy with Europe, which received a major boost in 1798 when Sulayman gave permission for a permanent British agent to be appointed in Baghdad.
[11] The aftermath of Sulayman the Great's death in 1802 was a power struggle between Ali Pasha the Kaymakam, Ahmad Agha leader of the Janissaries, and Selim agha, which was won by Ali Al-kahiya (Georgian: ალი ფაშა), who started a campaign to discipline Kurdish tribes who paid a tribute through their animals, then put down a rebellion by the Yazidis in Sinjar, then rode to Tal Afar and arrested Muhammad beg al Shawi and his brother and executed them both, due to animosity towards them, then he returned to Baghdad to quell disorder there.
Dawud Pasha initiated important modernization programs that included clearing canals, establishing industries, reforming the army with the help of European instructors, and founding a printing press.
Besides the usual troubles with the Arab tribes and internal dissensions with sheikhs, he was involved in more serious fighting with the Kurds and the conflict with Iran over the influence in the Kurdish principality of Baban.
[10][12] Meanwhile, the existence of the autonomous regime in Iraq, a long-time source of anxiety at Constantinople, became even more threatening to the Porte when Muhammad Ali Pasha of Egypt began to claim Ottoman Syria.