In the history of Baghdad, the period from 1831 to 1917 began with the fall of the Mamluk dynasty in 1831 after the Ottoman Empire occupied the city. It ended with the Fall of Baghdad on 11 March 1917 after the British Empire occupied the city during the First World War. Ali Rıza Pasha was a first Ottoman Governor of Baghdad, and Khalil Pasha was the last.