The city of Beijing has a long and rich history that dates back over 3,000 years. Prior to the unification of China by the First Emperor in 221 B.C., Beijing was for centuries the capital of the ancient state of Yan. During the first millennia of imperial rule, Beijing was but a provincial city in northern China. Its stature grew in the 10th to the 13th centuries when the nomadic Khitan and Jurchen peoples from the steppes expanded into northern China, and made the city a capital of their dynasties, the Liao and Jin. When Kublai Khan made Dadu the capital of the Yuan Dynasty (1279-1368), all of China was ruled from Beijing for the first time. From this time onward, with the exception of two interludes from 1368 to 1421 and 1928 to 1949, Beijng would remain as China's capital, serving as the seat of power for the Ming (1421-1644) and Qing (1644-1912) dynasties, the early Republic of China (1912-1928) and now the People's Republic of China (1949 - present).
The earliest remains of hominid habitation in Beijing Municipality were found in the caves of Dragon Bone Hill near the village of Zhoukoudian in Fangshan District, where the Homo erectus Peking Man (Sinanthropus pekinensis) lived from 770,000 to 230,000 years ago.
Beijing is first mentioned in history in the chronicles of the Zhou Dynasty's conquest of the Shang Dynasty in the 11th Century B.C. According to Sima Qian's Records of the Grand Historian, King Wu of Zhou, in the 11th year of his reign, deposed the last Shang king and conferred titles of nobility to the local rulers within his domain.
During the first one thousand years of Chinese imperial history, Beijing was a provincial city on the northern periphery of China proper. The Qin Dynasty built a highly centralized state and divided the country into 48 commandaries (jun), two of which are located in present-day Beijing.
In 1900, during the Boxer Rebellion Beijing was violently conquered and looted by the Eight Power Allied Force. In 1928 Beijing became "Beiping" after the Nationalist Party (Kuomintang, or KMT) moved the national capital to Nanjing, and Beijing therefore lost its status of political center. In late July 1937, Beijing was occupied by the Japanese army until 1945. In late January, 1949 Beijing surrendered to the Communist regime and became the capital city for Mao Zedong.
On 1911 October 10, the Xinhai Revolution overthrew the Qing Dynasty and established the Republic of China. Beijing remained the capital of this new republic, but political instability in the new government eventually deteriorated into civil war. Beijing became the site of several conflicts between rival warlord factions, changing hands several times over the next two decades.
On October 1 of the same year, Mao Zedong proclaimed the establishment of the People's Republic of China at the gates of Tiananmen. The name of Beiping was restored to Beijing, and the city was again designated as the capital of China.
During the late years of the Cultural Revolution decade (1966-76), political life in China was dominated by contention between radical and conservative factions in the Communist Party. Mao Zedong's ambivalence, first supporting one faction and then the other, has long puzzled scholars.
The 1990s and the start of the new millennium were a period of rapid economic growth in Beijing. Following the economic reforms of Deng Xiaoping, what was once farmland surrounding the city was developed into new residential and commercial districts. Modern expressways and high-rise buildings were built throughout the city to accommodate the growing and increasingly affluent population of the city. Foreign investment transformed Beijing into one of the most cosmopolitan and prosperous cities in the world.