The history of the Kyrgyz people and the land of Kyrgyzstan goes back more than 2,000 years. Although geographically isolated by its mountainous location, it had an important role as part of the historical Silk Road trade route. In between periods of self-government it was ruled by Göktürks, the Uyghur Empire, and the Khitan people, before being conquered by the Mongols in the 13th century; subsequently it regained independence but was invaded by Kalmyks, Manchus and Uzbeks. In 1876 it became part of the Russian Empire, remaining in the USSR as the Kirghiz Soviet Socialist Republic after the Russian Revolution. Following Mikhael Gorbachev's democratic reforms in the USSR, in 1990 pro-independence candidate Askar Akayev was elected president of the SSR. On 31 August 1991, Kyrgyzstan declared independence from Moscow, and a democratic government was subsequently established.
Stone implements found in the Tian Shan mountains indicate the presence of human society in what is now Kyrgyzstan as many as 200,000 to 300,000 years ago. The first written records of a civilization in the area occupied by Kyrgyzstan appear in Chinese chronicles beginning about 2000 BC.
The Yenisei Kirghiz lived in the upper Yenisey River valley, central Siberia. Chinese sources of the 2nd century BC and Muslim sources of the 7th–12th centuries AD describe the Kyrgyz as red-haired with fair complexion and green (blue) eyes. First appearing in Chinese Records of the Grand Historian as Gekun or Jiankun (鬲昆 or 隔昆), and later as part of the Tiele tribes, they came under the rule of the Göktürks and Uyghurs. Later Kyrgyzstan it was part of the Kushan empire during Buddhism. The early Kyrgyz state reached its greatest expansion after defeating the Uyghur Khaganate in 840 AD. Then Kyrgyz quickly moved as far as the Tian Shan range and maintained their dominance over this territory for about 200 years. In the 12th century, however, the Kyrgyz domination had shrunk to the Altay Range and the Sayan Mountains as a result of the rising Mongol expansion. With the rise of the Mongol Empire in the 13th century, the Kyrgyz migrated south. Plano Carpin, an envoy of the Papal states, and William Rubruck, an envoy of France, all wrote about their life under the Mongols. Various Turkic peoples ruled them until 1685, when they came under the control of the Oirats (Dzungars).