Digs show people living here as early as the 4th millennium BC, and a fortress stood on the site by about 364 AD. Georgians prefer a better story. King Vakhtang Gorgasali was out hunting when his falcon caught a pheasant, both birds dropped into a hot spring and died, and the king decided to build a city on the warm ground. He probably rebuilt rather than founded it. Still, his statue now stands by Metekhi above the river, and his son Dachi is said to have moved the capital here from Mtskheta.
Its place on the roads between Europe and Asia made the city rich, and made every neighbouring power want it. Arab armies took it around 737; under their emirate Tbilisi traded across the Middle East and became a mainly Muslim city. In 1122 David the Builder stormed it and made it the capital of a united Georgia. By the end of that century some 100,000 people lived here, and in Queen Tamar's time Shota Rustaveli wrote his epic, The Knight in the Panther's Skin, in the city.
The golden age lasted barely a century. The Mongols took control in 1236, Tamerlane's armies arrived in 1386, and from the 1510s Safavid Iran held the city as a vassal, with a permanent garrison from 1551. Shah Suleiman I walled it in 1675. The worst came last: in 1795 the Qajar ruler Agha Mohammad Khan captured and wrecked Tbilisi. So little survived that most old buildings you see date from after 1801, though Kala, Abanotubani and Avlabari were rebuilt along their medieval streets.
King Erekle turned to Russia for help, and in 1801 the Russian Empire annexed his kingdom outright. As Tiflis, the city became the seat of the viceroys who governed both sides of the Caucasus. Sololaki, Vera and Golovin Avenue, today's Rustaveli Avenue, were laid out on a European plan, and the Art Nouveau facades of Sololaki come from the last decades of Russian rule. Pushkin, Tolstoy and Lermontov all spent time here. The mix of peoples and faiths grew its own Tbilisuri culture, with a folklore and way of speaking that belonged to the city alone.
Georgia declared independence in May 1918, in the former viceroy's palace, and Tbilisi State University opened that same year. The republic lasted under three years: the Red Army fought its way in on 25 February 1921. Soviet rule left the Stalinist Parliament on Rustaveli Avenue, Vake Park (1946), the tower-block districts of Gldani and Varketili, and a metro from 1966. It also fixed the name: Tiflis officially became Tbilisi in 1936. On 9 April 1989 Soviet troops broke up a protest on Rustaveli Avenue and 20 people died, a day the country still marks every year.
Independence in 1991 began badly. Rival forces fought a two-week civil war in the city that winter, mafia clans shot it out in the streets, and under Eduard Shevardnadze corruption reached most corners of life while many people slid into poverty. In November 2003 more than 100,000 people came out against rigged elections, and the Rose Revolution followed. Crime has fallen since and visitors have poured in: Georgia counted over 9 million in 2019. You can see the boom in the new towers and in the kamikaze loggias bolted onto old apartment blocks.