including relocations of the capital to Samarra (during 808–819 and 836–892), the loss of the western and easternmost provinces, and periods of political domination by the Iranian Buwayhids (945–1055) and Seljuk Turks (1055–1135). Nevertheless, the city remained one of the cultural and commercial hubs of the Islamic world until February 10, 1258, when it was sacked by the Mongols under Hulagu Khan. The Mongols massacred most of the city's inhabitants, including the Abbasid Caliph Al-Musta'sim, and destroyed large sections of the city. The canals and dykes forming the city's irrigation system were destroyed. The sack of Baghdad put an end to the Abbasid Caliphate, a blow from which the Islamic civilization never fully recovered. The Mongols placed a Chinese governor in Baghdad after it was captured. At this point Baghdad was ruled by the Il-Khanids, part of the Mongolian Empire centered in Iran. The city was reconstructed and flourished under the Mongols. In 1401, Baghdad was again conquered, by Timur ("Tamerlane"). It became a provincial capital controlled by the Jalayirid (1400–1411), Qara Qoyunlu (1411–1469), Aq Quyunlu (1469–1508), and Safavid Persian (1508–1534) – (1604–1638) empires. Ottoman Baghdad (16th to 19th centuries) In 1534, Baghdad was conquered by the Ottoman Turks, under the leadership of Murad IV, also called Bagdat fetih Murat Han Under the Ottomans, Baghdad fell into a period of decline, partially as a result of the enmity between its rulers and Safavid Persia. For a time, Baghdad had been the largest city in the Middle East before being overtaken by Constantinople in the 16th century. The city saw a relative revival in the latter part of the 18th century under the Mamluk dynasty. The Nuttall Encyclopedia reports the 1907 population of Baghdad as 185,000. War timeline Siege of Baghdad (812–813), during the Fourth Fitna (Islamic Civil War) Siege of Baghdad (865), during the Fifth Fitna Battle of Baghdad (946), Buyid–Hamdanid War Siege of Baghdad (1136), by the Seljuks Siege of Baghdad (1157), by the Seljuks Siege of Baghdad (1258), Mongol conquest of Baghdad Siege of Baghdad (1393), by Tamerlane Siege of Baghdad (1401), by Tamerlane Capture of Baghdad (1534), Ottoman–Safavid Wars Capture of Baghdad (1624), Ottoman–Safavid Wars Siege of Baghdad (1625), Ottoman–Safavid Wars Capture of Baghdad (1638), Ottoman–Safavid Wars Siege of Baghdad (1733), Ottoman-Persian Wars Fall of Baghdad (1917), World War I Battle of Baghdad (2003), United States invasion of Iraq Battle of Baghdad (2006–2008), Iraq War 20th and