The Oghuz Turkic ancestors of the Turkmens first appeared in the area of Turkmenistan in the eighth to tenth centuries A.D. The name "Turkmen" first appears in eleventh-century sources. Initially it seems to have referred to certain groups from among the Oghuz that had converted to Islam. During the thirteenth-century Mongol invasion into the heart of Central Asia, the Turkmens fled to more remote regions close to the Caspian shore. Thus, unlike many other peoples of Central Asia, they were little influenced by Mongol rule and, therefore, Mongol political tradition. In the sixteenth century the Turkmens once again began to migrate throughout the region of modern Turkmenistan, gradually occupying the agricultural oases. By the middle of the nineteenth century, the majority of Turkmens had become sedentary or seminomadic agriculturalists, although a significant portion remained exclusively nomadic stockbreeders.
From the sixteenth to nineteenth centuries the Turkmens repeatedly clashed with neighboring sedentary states, especially the rulers of Iran and the khanate of Khiva. Divided into more than twenty tribes and lacking any semblance of political unity, the Turkmens managed, however, to remain relatively independent throughout this period. By the early nineteenth century the dominant tribes were the Teke in the south, the Yomut in the southwest and in the north around Khorezm, and the Ersari in the east, near the Amu Darya. These three tribes constituted over one-half the total Turkmen population at that time.
In the early 1880s the Russian Empire succeeded in subjugating the Turkmens, but only after overcoming fiercer resistance from most Turkmens than from other conquered groups of Central Asia. At first the traditional society of the Turkmens was relatively unaffected by czarist rule, but the building of the Transcaspian Railroad and the expansion of oil production on the Caspian shore both led to a large influx of Russian colonists. The czarist administrators encouraged the cultivation of cotton as a cash crop on a large scale.
The Bolshevik Revolution in Russia was accompanied by a period of rebellion in Central Asia known as the Basmachi Revolt. Many Turkmens participated in this rebellion, and, after the victory of the Soviets, many of these Turkmens fled to Iran and Afghanistan. In 1924 the Soviet government established modern Turkmenistan. In the early years of Soviet rule, the government tried to break the power of the tribes by confiscating tribally held lands in the 1920s and introducing forced collectivization in the 1930s. Although pan-Turkmen identity was certainly strengthened under Soviet rule, the Turkmens of the former Soviet Union retain their sense of tribal consciousness to a great extent. The seventy years of Soviet rule have seen the elimination of nomadism as a way of life and the beginnings of a small but influential educated urban elite. This period also witnessed the firm establishment of the supremacy of the Communist party. Indeed, as reformist and nationalist movements swept the Soviet Union in recent years, Turkmenistan remained a bastion of conservatism, displaying very few signs of joining in the process of perestroika .