People were living on the old peninsula by the 6th millennium BC; archaeologists only found the traces this century, some while digging a metro station at Yenikapı. The city proper dates from about 660 BC, when colonists from the Greek city of Megara founded Byzantium on the European shore and built an acropolis beside the Golden Horn. It joined the Roman Empire in 73 AD. Siding with the wrong claimant to the throne cost it two years of siege by Septimius Severus, who then rebuilt it.
Constantine the Great refounded it as a Christian city, and in 330 it became capital of the Roman Empire. Most people called it Constantinople. After the empire split in 395 it ruled the east for another thousand years, and Justinian added Hagia Sophia. You can still see that Roman city: the Hippodrome's obelisks stand in Sultanahmet Square, Constantine's column of 330 is nearby, and the land walls Theodosius built from 408 run almost unbroken along the peninsula's western edge.
For much of the Middle Ages this was the largest and richest city in Europe. In 1204 the Fourth Crusade, supposedly heading elsewhere, sacked it and set up a Latin Empire; the Byzantines got their capital back in 1261. In 1453, after a siege of 55 days in which the last emperor, Constantine XI, died, Sultan Mehmed II took the city.
Mehmed rode to Hagia Sophia within hours and had it declared a mosque. He invited people from all over Europe and rebuilt on a grand scale: a new palace, more than a dozen mosques and the covered market that is now the Grand Bazaar. Under Suleiman the Magnificent, who reigned from 1520 to 1566, the architect Mimar Sinan designed several of the city's buildings, and tiles, calligraphy and miniatures flourished. By the late 18th century 570,000 people lived here.
The 19th-century Tanzimat reforms brought bridges over the Golden Horn and, in the 1880s, a rail link to Europe. Embassies and Neoclassical blocks filled the streets around İstiklal, and Dolmabahçe Palace became the seat of government. None of it saved the empire. Allied troops occupied the city from 1918 to 1923, and when the Republic was declared that October, Ankara became the capital. The name Istanbul, from a Greek phrase meaning "to the city", became official in 1930.
The new state was hard on the city's minorities. A 1942 wealth tax fell far more heavily on non-Muslims, and the 1955 pogrom drove out most remaining Greeks: 110,000 Greeks lived here in 1919, and only about 2,500 by 2000. Meanwhile planners cut boulevards and squares such as Taksim through old quarters. Later, migrants from Anatolia poured in to work in new factories, helped by the first Bosphorus Bridge in 1973, and the population has grown tenfold since the 1950s.
Politics still plays out on the streets. Plans to build over Gezi Park set off nationwide protests in 2013, Hagia Sophia went back to being a mosque in 2020. In March 2025 hundreds of thousands marched in support of mayor Ekrem İmamoğlu, President Erdoğan's main rival, after his arrest on corruption charges. A quake of magnitude 7 or more is also thought very likely this century.