The territory of Turkmenistan has been populated since ancient times, as armies from one empire to another decamped on their way to more prosperous territories. Tribes of horse-breeding Turkmen drifted into the territory of Turkmenistan from ancient times, possibly from the Altay Mountains, and grazed along the outskirts of the Karakum Desert into Persia, Syria, and Anatolia.
Alexander the Great conquered the territory in the 4th century B.C. on his way to India. One hundred fifty years later the Parthian Kingdom took control of Turkmenistan, establishing its capital in Nisa, an area now located in the suburbs of the modern-day capital of Ashgabat. In the 7th century A.D. Arabs conquered this region, bringing with them the Islamic religion and incorporating the Turkmen into Middle Eastern culture. It was around this time that the famous "Road" was established as a major trading route between Asia and Europe.
In the middle of the 11th century, the powerful Turks of the Seldjuk Empire concentrated their strength in the territory of Turkmenistan in an attempt to expand into Afghanistan. The empire broke down in the second half of the 12th century, and the Turkmen lost their independence when Genghis Khan took control of the eastern Caspian Sea region on his march west. For the next 7 centuries the Turkmen people lived under various empires and fought constant intertribal wars amongst themselves.
From the 16th century on, Turkmen raiders on horseback preyed on passing caravans, pillaging and taking prisoners for the slave trade. After kidnapping Russians from the expanding Tsarist Empire, the Turkmen fell into trouble. Russia sent forces to Turkmenistan, and in 1881 fighting climaxed with the massacre of 7,000 Turkmen at the desert fortress of Geok Depe, near modern Ashgabat; another 8,000 were killed trying to flee across the desert. By 1894 imperial Russia had taken control of Turkmenistan. The October Revolution of 1917 in Russia and subsequent political unrest led to the declaration of the Turkmen Republic as one of the 15 republics of the Soviet Union in 1924. At this time the modern borders of Turkmenistan were formed.
The Turkmen Republic was under full control of Moscow, which exploited its raw materials resources for the purposes of the Soviet Union. Sovereignty was only a formality, since Russia ultimately ruled all Soviet states.