
Both claim to be the sole legitimate government of China, although the United Nations has recognized the PRC as the sole representation since 1971. The civil war ended in 1949 with the division of Chinese territory the CCP established the People's Republic of China on the mainland while the Kuomintang-led ROC government retreated to the island of Taiwan. The surrender and expulsion of Japanese forces from China in 1945 left a power vacuum in the country, which led to renewed fighting between the CCP and the Kuomintang. Japan invaded China in 1937, starting the Second Sino-Japanese War and temporarily halting the civil war. In its early years of the Republic, the country became unstable known as the Warlord Era before reunifying the nation in 1928 under the nationalist government while the alliance between the Kuomintang (KMT) and the Chinese Communist Party (CCP) had fallen apart that led to a civil war that lasted two decades. The Chinese monarchy collapsed in 1912 with the Xinhai Revolution, when the Republic of China (ROC) replaced the Qing dynasty.

The Manchu-led Qing dynasty nearly doubled the empire's territory and established a multi-ethnic state that was the basis of the modern Chinese nation, but suffered heavy losses to foreign imperialism in the 19th century. The Mongol invasion established the Yuan dynasty in 1279, but the Ming dynasty (1368–1644) re-established Han Chinese control.

The civilian scholar-official or literati used the examination system and the doctrines of Neo-Confucianism to replace the military aristocrats of earlier dynasties. The early modern Song dynasty (960–1279) became increasingly urban and commercial. The multi-ethnic Tang welcomed foreign trade and culture that came over the Silk Road and adapted Buddhism to Chinese needs. After centuries of disunion following the fall of the Han, the Sui (581–618) and Tang (618–907) dynasties reunified the empire. The empire expanded, fractured and re-unified, was conquered and reestablished, absorbed foreign religions and ideas, and made world-leading scientific advances, such as the Four Great Inventions: gunpowder, paper, the compass, and printing. The Qin was followed by the more stable Han dynasty (206 BCE – 220 CE), which established a model for nearly two millennia in which the Chinese empire was one of the world's foremost economic powers. In the third century BCE, Qin's wars of unification created the first Chinese empire, the short-lived Qin dynasty. Chinese writing, Chinese classic literature, and the Hundred Schools of Thought emerged during this period and influenced China and its neighbors for centuries to come. The semi-legendary Xia dynasty in the 21st century BCE and the well-attested Shang and Zhou dynasties developed a bureaucratic political system to serve hereditary monarchies, or dynasties. Modern Chinese trace their origins to a cradle of civilization in the fertile basin of the Yellow River in the North China Plain. The national capital is Beijing, and the most populous city and financial center is Shanghai. The country consists of 22 provinces, five autonomous regions, four municipalities, and two Special Administrative Regions ( Hong Kong and Macau).

Covering an area of approximately 9.6 million square kilometers (3,700,000 sq mi), it is the world's third largest country by total land area.

China also has a narrow maritime boundary with the disputed Taiwan. China spans five geographical time zones and borders fourteen countries by land, the most of any country in the world, tied with Russia. It is the world's most populous country with a population exceeding 1.4 billion people. China, officially the People's Republic of China ( PRC), is a country in East Asia.
