The Qing dynasty or the Qing Empire, officially the Great Qing (), was the last dynasty in the imperial history of China. It was established in 1636, and ruled China from 1644 to 1912, with a brief restoration in 1917. It was preceded by the Ming dynasty and succeeded by the Republic of China. The multiethnic Qing empire lasted for almost three centuries and assembled the territorial base for modern China. It was the largest Chinese dynasty and in 1790 the fourth largest empire in world history in terms of territory. With a population of 432 million in 1912, it was the world's most populous country at the time.