The Zygii people lived in the area in antiquity. From the 6th to the 11th centuries, the area successively belonged to the Georgian kingdoms of Egrisi and Abkhazia who built a dozen churches within the city boundaries. From the 11th to the 15 century it was a part of Georgian Kingdom. The Christian settlements along the coast were destroyed by the invading Gokturks, Khazars, and other nomadic empires whose control of the region was slight. The northern wall of an 11th-century Byzantinesque basilica still stands in the district of Loo.
From the 15th century onward, the area, known as Ubykhia was part of historical Circassia, and was controlled by the native people of the local mountaineer clans of the north-west Caucasus, nominally under the sovereignty of the Ottoman Empire, which was their principal trading partner in the Muslim world. The coastline was ceded to Russia in 1829 as a result of a Caucasian War and Russo-Turkish War, 1828-1829.
The Russians had no detailed knowledge of the area until Baron Fyodor Tornau secretly investigated the coastal route from Gelendzhik to Gagra, and across the mountains to Kabarda, in the 1830s.
In 1838, the fort of Alexandria, renamed Navaginsky a year later, was founded at the mouth of the Sochi River as part of the Black Sea Coastal Line, a chain of fortifications set up to protect the area from recurring Circassian incursions. At the outbreak of the Crimean War, the garrison was evacuated from Navaginsky in order to prevent its capture by the Turks, who effected a landing on Cape Adler soon after.
The last battle of Caucasian War took place at Godlikh river on March 18, 1864 O.S., the ubykhs were defeated by Dakhovsky regiment of Russian Army. At March 25, 1864 the Dakhovsky fort was established on the place of Navaginsky fort. The end of Caucasian War was proclaimed at Kbaade tract (modern Krasnaya Polyana) on June 2, 1864 (May 21 O.S.), 1864, by manifesto of Emperor Alexander II of Russia read aloud by Grand Duke Michael Nikolaevich of Russia.
After the end of Caucasian War (during the period of 1864-1870) almost all Ubykhs and a major part of the Shapsugs, who lived on the territory of modern Sochi, moved to the Ottoman Empire (see Muhajir). Since 1866 the coast was being actively resettled by Russians, Armenians, Ukrainians, Belorussians, Greeks, Estonians, Germans, Moldavians, Georgians and other people from inner Russia.
In 1874-1891 the first Orthodox church, St. Michaels Church, has been constructed and Dakhovsky settlement was renamed into Dakhovsky Posad on April 13, 1874 (O.S.). In February of 1890 the Sochi Lighthouse has been constructed. In 1896, the Dakhovsky Posad was renamed to Sochi Posad (after the name of local river) and incorporated into newly formed Black Sea Governorate. In 1900-1910 Sochi burgeoned into a sea resort, the first resort, "Kavkazskaya Riviera", has been opened on June 14, 1909 (O.S.). Sochi was granted municipal rights in 1917.As a result this war the ancient country – Circassia [Cherkesiya]disappeared from the map of the World, the Circassian ([adygskiy]) people, to genocide - it lost 9/10 its territory, it is more than 90% population, it was scattered throughout the world, it sustained the irreplaceable physical and cultural losses.
During the Russian Civil War, the littoral area saw sporadic armed clashes involving the Red Army, White movement forces, and the Democratic Republic of Georgia. In 1923 Sochi acquired one of its most distinctive features, a railway which runs from Tuapse to Abkhazia within a mile or two of the coastline. Although this branch of the Northern Caucasus Railway may appear somewhat incongruous in the setting of beaches and sanatoriums, it is still operational and vital to the regions transportation infrastructure.
Sochi was established as a fashionable resort area under Joseph Stalin, who had his favourite dacha built in the city; Stalins study, complete with a wax statue of the leader, is now open to the public. It was at that time that the coast became dotted with imposing Neoclassical buildings, exemplified by the opulent Rodina and Ordzhonikidze sanatoriums. The centerpiece of an earlier period is Shchusevs Constructivist Institute of Rheumatology (1927-31). The area was extensively developed until the demise of the Soviet Union.
Following Russias loss of the traditionally popular resorts of the Crimean peninsula (transferred away from the Russian SFSR to the Ukrainian SSR in 1954 by Nikita Khrushchev), Sochi emerged as the unofficial summer capital of the country. During Vladimir Putins term in office, the city witnessed a significant increase in investment, although many Russian vacationers still flock to the cheaper resorts of neighboring Abkhazia, Ukraine, or to the Mediterranean coast of Turkey.
Additionally, Sochi has also served as the location for the signing of many treaties, especially those between the Georgian, Abkhazian, and South Ossetian governing authorities.