Beijing (北京 Běijīng) is the capital of the People's Republic of China, the most populous country in the world. With a population of 21,500,000 people, it is the nation's second-largest city after Shanghai. It was also the seat of the Ming and Qing dynasty emperors until the establishment of the Republic of China in 1911. Beijing is the political, educational and cultural centre of the country and as such it is rich in historical sites and important government and cultural institutions.
Beijing literally means Northern Capital, a role it has played many times in China's long history. Beijing's history dates back several thousand years but it first became notable in Chinese history after it was made the capital of the State of Yan under the name Yanjing. Yan was one of the major kingdoms of the Warring States Period, some 2,000 years ago. After the fall of Yan, during the later Han and Tang dynasties, the Beijing-area was a major prefecture of northern China. In 938, Beijing was conquered by the Khitans and declared the capital of the Liao Dynasty. The Mongols seized the city in 1215. From 1264 Beijing served as the capital of a united China under Kublai Khan. His victorious Mongol forces renamed the city, Great Capital (大都). From there, Kublai and his descendants ruled their empire from a northern location closer to the Mongol homelands. During this period, the walled city was enlarged and many palaces and temples were built.