Mongolia has been inhabited for over 800,000 years. Mongolia, since prehistoric times, has been inhabited by nomads who, from time to time, formed great confederations that rose to prominence. The first of these, the Xiongnu, were brought together to form a confederation by Modu Shanyu in 209 BC. During the 7th and 8th centuries, Uyghurs and then Khitans and Jurchens ruled. By the 10th century, the country was divided into numerous tribes linked through transient alliances and involved in the old patterns of internal strife.
In the chaos of the late 12th century, a chieftain named Temüjin finally succeeded in uniting the Mongol tribes between Manchuria and the Altai Mountains. In 1206, he took the title Genghis Khan, and waged a series of military campaigns - renowned for their brutality and ferocity - sweeping through much of Asia, and forming the Mongol Empire, the largest contiguous land empire in world history. Under his successors it stretched from present-day Poland in the west to Korea in the east, and from Siberia in the north to the Gulf of Oman and Vietnam in the south, covering some 33,000,000 square kilometres.
The next centuries were marked by violent power struggles between various factions, notably the Genghisids and the non-Genghisid Oirads and numerous Chinese invasions. The last Mongol Khan was Ligden Khan in the early 17th century. He got into conflicts with the Manchu over the looting of Chinese cities, and managed to alienate most Mongol tribes. Until 1911, the Manchu maintained control of Mongolia with a series of alliances and intermarriages, as well as military and economic measures.
Mongolian independence was achieved in 1911 after the fall of the Qing Dynasty. China attempted to reassert its rule following the Russian Revolution of 1917 but was beaten back in 1921, with Soviet help. The Soviet intervention led to virtual occupation by the USSR for the next 70 years.
China finally recognised Mongolian independence in 1944 and in 1990 pro-democracy demonstrations erupted in Ulaanbaatar eventually leading to the demise of communism and the creation of a new constitution based on democratic principles.
Mongolia is undergoing dramatic change with the demise of a traditional nomadic lifestyle that, a generation ago, was lived by a third of the population. Mongolia's cities are growing rapidly as people leave the land. Another important change has been the resurgence of Buddhism, which was largely suppressed under Communism; Mongolians are adherents of the Dalai Lama, although this is handled with great caution by the country's leadership for fear of upsetting the Chinese.