The Great Wall of China (simplified Chinese: 长城; traditional Chinese: 長城; pinyin: Chángchéng; literally "long fortress" or simplified Chinese: 万里长城; traditional Chinese: 萬里長城; pinyin: Wànlǐ Chángchéng; literally "The long wall of 10,000 Li (里)") is a series of stone and earthen fortifications in northern China, built originally to protect the northern borders of the Chinese Empire against intrusions by various nomadic groups such as the Xiongnu from the north and rebuilt and maintained between the 5th century BC and the 16th century. Since the 5th century BC, several walls have been built that were referred to as the Great Wall. One of the most famous is the wall built between 220–206 BC by the first Emperor of China, Qin Shi Huang. Little of that wall remains; the majority of the existing wall was built during the Ming Dynasty.The Great Wall stretches from Shanhaiguan in the east to Lop Nur in the west, along an arc that roughly delineates the southern edge of Inner Mongolia. The most comprehensive archaeological survey, using advanced technologies, has recently concluded that the entire Great Wall, with all of its branches, stretches for 8,851.8 km (5,500.3 mi). This is made up of 6,259.6 km (3,889.5 mi) of sections of actual wall, 359.7 km (223.5 mi) of trenches and 2,232.5 km (1,387.2 mi) of natural defensive barriers such as hills and rivers.The Chinese were already familiar with the techniques of wall-building by the time of the Spring and Autumn Period, which began around the 8th century BC. During the Warring States Period from the 5th century BC to 221 BC, the states of Qi, Yan and Zhao all constructed extensive fortifications to defend their own borders. Built to withstand the attack of small arms such as swords and spears, these walls were made mostly by stamping earth and gravel between board frames. Qin Shi Huang conquered all opposing states and unified China in 221 BC, establishing the Qin Dynasty. Intending to impose centralized rule and prevent the resurgence of feudal lords, he ordered the destruction of the wall sections that divided his empire along the former state borders. To protect the empire against intrusions by the Xiongnu people from the north, he ordered the building of a new wall to connect the remaining fortifications along the empire's new northern frontier. Transporting the large quantity of materials required for construction was difficult, so builders always tried to use local resources. Stones from the mountains were used over mountain ranges, while rammed earth was used for construction in the plains. There are no surviving historical records indicating the exact length and course of the Qin Dynasty walls. Most of the ancient walls have eroded away over the centuries, and very few sections remain today. Later, the Han, Sui, Northern and Jin dynasties all repaired, rebuilt, or expanded sections of the Great Wall at great cost to defend themselves against northern invaders. It is estimated that over 1 million workers died building the wall
The Great Wall concept was revived again during the Ming Dynasty following the Ming army's defeat by the Oirats in the Battle of Tumu in 1449. The Ming had failed to gain a clear upper-hand over the Manchurian and Mongolian tribes after successive battles, and the long-drawn conflict was taking a toll on the empire. The Ming adopted a new strategy to keep the nomadic tribes out by constructing walls along the northern border of China. Acknowledging the Mongol control established in the Ordos Desert, the wall followed the desert's southern edge instead of incorporating the bend of the Huang He.Unlike the earlier Qin fortifications, the Ming construction was stronger and more elaborate due to the use of bricks and stone instead of rammed earth. As Mongol raids continued periodically over the years, the Ming devoted considerable resources to repair and reinforce the walls. Sections near the Ming capital of Beijing were especially strong.
During the 1440s–1460s, the Ming also built a so-called "Liaodong Wall". Similar in function to the Great Wall (whose extension, in a sense, it was), but more basic in construction, the Liaodong Wall enclosed the agricultural heartland of the Liaodong province, protecting it against potential incursions by Jurched-Mongol Oriyanghan from the northwest and the Jianzhou Jurchens from the north. While stones and tiles were used in some parts of the Liaodong Wall, most of it was in fact simply an earth dike with moats on both sides.
Towards the end of the Ming Dynasty, the Great Wall helped defend the empire against the Manchu invasions that began around 1600. Under the military command of Yuan Chonghuan, the Ming army held off the Manchus at the heavily fortified Shanhaiguan pass, preventing the Manchus from entering the Chinese heartland. The Manchus were finally able to cross the Great Wall in 1644, when the gates at Shanhaiguan were opened by Wu Sangui, a Ming border general who disliked the activities of rulers of the Shun Dynasty. The Manchus quickly seized Beijing, and defeated the newly founded Shun Dynasty and remaining Ming resistance, to establish the Qing Dynasty.
In 2009, an additional 290 kilometres (180 miles) of previously undetected portions of the wall, built during the Ming Dynasty, were discovered. The newly discovered sections range from the Hushan mountains in the northern Liaoning province to Jiayuguan in western Gansu province. The sections had been submerged over time by sandstorms that moved across the arid region.
Under Qing rule, China's borders extended beyond the walls and Mongolia was annexed into the empire, so construction and repairs on the Great Wall were discontinued.