The last Ottoman sultan, Mehmed VI, departing from the backdoor of the Dolmabahçe Palace a year before the declaration of the Republic of Turkey.
A period of rebellion at the start of the 19th century led to the rise of the progressive Sultan Mahmud II and eventually the Tanzimat period, which produced reforms that aligned the empire along Western European standards. Bridges across the Golden Horn were constructed during this period,and Istanbul was connected to the rest of the European railway network in the 1880s.The Tünel, one of the world's oldest subterranean urban rail lines, opened in 1875;
other modern facilities, such a stable water network, electricity, telephones, and trams, were gradually introduced to Istanbul over the following decades, although later than to other European cities.
The last Ottoman sultan, Mehmed VI, departing from the backdoor of the Dolmabahçe Palace a year before the declaration of the Republic of Turkey.
Still, the modernization efforts were not enough to forestall the decline of the Ottoman regime. The early 20th century saw the Young Turk Revolution, which disposed of Sultan Abdul Hamid II, and a series of wars that plagued the ailing empire's capital. The last of these, World War I, resulted in the British, French, and Italian occupation of Istanbul. The final Ottoman sultan, Mehmed VI, was exiled in November 1922; the following year, the occupation of Istanbul ended with the signing of the Treaty of Lausanne and the recognition of the Republic of Turkey, which was declared by Mustafa Kemal Atatürk on 29 October 1923 In the early years of the republic, Istanbul was overlooked in favor of the country's new capital, Ankara. However, starting from the late 1940s and early 1950s, Istanbul underwent great structural change, as new public squares (such as Taksim Square), boulevards, and avenues were constructed throughout the city, sometimes at the expense of historical buildings. In 1955, the Istanbul Pogrom targeted the city's ethnic Greek community.