History of the Great Wall of China



The history of the Great Wall of China traditionally began when fortifications built by various states during the Spring and Autumn (771–476) and Warring States periods (475–221) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221–206) against incursions by nomads from Inner Asia. Later dynasties differed in their approach to Qin's precedent. The Han (202 – 220), the Northern Qi (550–574), the Sui (589–618), and particularly the Ming (1369–1644) were among those that rebuilt, re-manned, and expanded the Walls, although they rarely followed Qin's original routes. Conversely, the Tang (618–907), the Song (960–1279), the Yuan (1271–1368), and the Qing (1644–1911) mostly left the Walls to rot, having resolved the Inner Asian threat through military campaigns and diplomacy (the Tang, Yuan, and Qing), or were simply took weak to build walls (the Song). At several points throughout its history the Great Wall failed to prevent invaders from conquering China, including in 1644 when the Manchu Qing marched through the gates of the Shanhai Pass and replaced the most ardent of the wall-building dynasties, the Ming, as rulers of China.

The Great Wall of China visible today largely dates from the Ming dynasty. Some sections remain in relatively good condition or have been renovated while others have been damaged or destroyed for ideological reasons, deconstructed for their building materials, or lost due to the ravages of time.

The wall is a revered national symbol in modern China and a popular tourist destination.

Geographical considerations
The conflict between the Chinese and the nomads, from which the need for the Great Wall arose, stemmed from a difference in geography. The 15" isohyet marks the extent of settled agriculture, dividing the fertile fields of China to the south and the semi-arid grasslands of Inner Asia to the north. The climates and the topography of the two regions led to distinct modes of societal development.

As Karl August Wittfogel points out, the loess soils of Shaanxi made it possible for the Chinese to develop irrigated agriculture early on. Although this allowed them to expand into the lower reaches of the Yellow River valley, such extensive waterworks on an ever-increasing scale required collective labour, something that could only be managed by some form of bureaucracy. Thus the scholar-bureaucrats came to the fore to keep track of the income and expenses of the granaries. Walled cities grew up around the granaries for reasons of defence along with ease of administration; they kept invaders out and ensured that citizens remained within. These cities combined to become feudal states, which eventually united to become an empire. Likewise, according to this model, walls not only enveloped cities as time went by, but also lined the borders of the feudal states and eventually the whole Chinese empire to provide protection against raids from the agrarian northern steppes.

The steppe societies of Inner Asia, whose climate favoured a pastoral economy, stood in stark contrast to the Chinese mode of development. As animal herds are migratory by nature, communities could not afford to be stationary and therefore evolved as nomads. According to the influential Mongolist Owen Lattimore this lifestyle proved to be incompatible with the Chinese economic model. As the steppe population grew, pastoral agriculture alone could not support the population, and tribal alliances needed to be maintained by material rewards. For these needs, the nomads had to turn to the settled societies to get grains, metal tools, and luxury goods, which they could not produce by themselves. If denied trade by the settled peoples, the nomads would resort to raiding or even conquest.

Potential nomadic incursion from three main areas of Inner Asia caused concern to northern China: Mongolia to the north, Manchuria to the northeast, and Xinjiang to the northwest. Of the three, China's chief concern since the earliest times had been Mongolia – the home of many of the country's fiercest enemies including the Xiongnu, the Xianbei, the Khitans, and the Mongols. The Gobi Desert, which accounts for two-thirds of Mongolia's area, divided the main northern and southern grazing lands and pushed the pastoral nomads to the fringes of the steppe. On the southern side (Inner Mongolia), this pressure brought the nomads into contact with China.

For the most part, barring intermittent passes and valleys (the major one being the corridor through Zhangjiakou and the Juyong Pass), the North China Plain remained shielded from the Mongolian steppe by the Yin Mountains. However, if this defence were breached, China's flat terrain offered no protection to the cities on the plain, including the imperial capitals of Beijing, Kaifeng, and Luoyang. Heading west along the Yin Mountains, the range ends where the Yellow River circles northwards upstream in the area known as the Ordos Loop – technically part of the steppe, but capable of irrigated agriculture. Although the Yellow River formed a theoretical natural boundary with the north, such a border so far into the steppe was difficult to maintain. The lands south of the Yellow River —the Hetao, the Ordos Desert, and the Loess Plateau— provided no natural barriers on the approach to the Wei River, the oft-called cradle of Chinese civilization where the ancient capital Xi'an lay. As such, control of the Ordos remained extremely important for the rulers of China: not only for potential influence over the steppe, but also for the security of China proper. The region's strategic importance combined with its untenability led many dynasties to place their first walls here.

Although Manchuria hosted the agricultural lands of the Liao River valley, its location beyond the northern mountains relegated it to the relative periphery of Chinese concern. When Chinese state control became weak, at various points in history Manchuria fell under the control of the pastoral nomads and forest tribes of the area, including the Jurchens and the Manchus. The most crucial route that links Manchuria and the North China Plain is a narrow coastal strip of land, wedged between the Bohai Sea and the Yan Mountains, called the Shanhai Pass (literally the "mountain and sea pass"). The pass gained much importance during the later dynasties, when the capital was set in Beijing, a mere 300 km away. In addition to the Shanhai Pass, a handful of mountain passes also provide access from Manchuria into China through the Yan Mountains, chief among them the Gubeikou and Xifengkou.

Xinjiang, considered part of the Turkestan region, consists of an amalgamation of deserts, oases, and dry steppe barely suitable for agriculture. When influence from the steppe powers of Mongolia waned, the various Central Asian oasis kingdoms and nomadic clans like the Göktürks and Uyghurs were able to form their own states and confederations that threatened China at times. China proper is connected to this area by the Gansu Corridor, a narrow string of oases bounded by the Gobi Desert to the north and the high Tibetan Plateau to the south. In addition to considerations of frontier defence, the Gansu Corridor also formed an important part of the Silk Road trade route. Thus it was also in China's economic interest to control this stretch of land, and hence the Great Wall's western terminus is in this corridor — the Yumen Pass during Han times and the Jiayu Pass during the Ming dynasty and thereafter.

Pre-Imperial China (7th century – 221 BC)
Among the first mentions of a wall built against northern invaders is found in a poem, dated from the seventh century BC, recorded in the Classic of Poetry. The poem tells of a king, now identified as King Xuan (r. 827 – 782BC) of the Western Zhou dynasty (1046 – 771), who commanded General Nan Zhong (南仲) to build a wall in the northern regions to fend off the Xianyun. The Xianyun, whose base of power was in the Ordos region, were regarded as part of the charioteering Rong tribes, and their attacks aimed at the early Zhou capital region of Haojing were probably the reason for King Xuan's response. Nan Zhong's campaign was recorded as a great victory. However, only a few years later in 771 BC another branch of the Rong people, the Quanrong, responded to a summons by the renegade Marquess of Shen by over-running the Zhou defences and laying waste to the capital. The cataclysmic event killed King Xuan's successor King You (795–771 ), forced the court to move the capital east to Chengzhou (成周, later known as Luoyang) a year later, and thus ushered in the Eastern Zhou dynasty (770 – 256). Most importantly, the fall of Western Zhou redistributed power to the states within and without Zhou's nominal rulership. The rule of the Eastern Zhou dynasty would be marked by bloody interstate anarchy. With smaller states being annexed and larger states waging constant war upon one another, many rulers came to feel the need to erect walls to protect their borders. Of the earliest textual reference to such a wall was the State of Chu's wall of 656 BC, 1400 m of which were excavated in southern Henan province in the modern era. The State of Qi also had fortified borders up by the 7th century BC, and the extant portions in Shandong province had been christened the Great Wall of Qi. The State of Wei built two walls, the western one completed in 361 BC and the eastern in 356 BC, with the extant western wall found in Hancheng, Shaanxi. Even non-Chinese peoples built walls, such as the Di state of Zhongshan and the Yiqu Rong (義渠), whose walls were intended to defend against the State of Qin.

Of these walls, those of the northern states Yan, Zhao, and Qin were connected by Qin Shi Huang when he united the Chinese states in 221 BC.

The State of Yan, the easternmost of the three northern states, began to erect walls after the general Qin Kai drove the Donghu people back "a thousand li" during the reign of King Zhao (燕昭王; r. 311–279 BC). The Yan wall stretched from the Liaodong peninsula, through Chifeng, and into northern Hebei, possibly bringing its western terminus near the Zhao walls. Another Yan wall was erected to the south to defend against the Zhao; it was southwest of present-day Beijing and ran parallel to the Juma River for several dozen miles.

The Zhao walls to the north were built under King Wuling of Zhao (r. 325–299 BC), whose groundbreaking introduction of nomadic cavalry into his army reshaped Chinese warfare and gave Zhao an initial advantage over his opponents. He attacked the Xiongnu tribes of Linhu (林胡) and Loufan (樓煩) to the north, then waged war on the state of Zhongshan until it was annexed in 296. In the process, he constructed the northernmost fortified frontier deep in nomadic territory. Three lines of walls were dated to be around King Wuling's reign: a southern long wall in northern Henan encompassing the noted Yanmen Pass; a second line of barricades encircling the Ordos Loop, extending from Zhangjiakou in the east to the ancient fortress of Gaoque (高闕) in the Urad Front Banner; and the third, northernmost line along the southern slopes of the Yin Mountains, extending from Qinghe in the east, passing north of Hohhot, and into Baotou.

Qin was originally a state on the western fringe of the Chinese political sphere, but it grew into a formidable power in the later parts of the Warring States period when it aggressively expanded in all directions. In the north, the state of Wei and the Yiqu built walls to protect themselves from Qin aggression, but were still unable to stop Qin from eating into their territories. The Qin reformist Shang Yang forced the Wei out of their walled area west of the Yellow River in 340, and King Huiwen of Qin (r.338 – 311) took 25 Yiqu forts in a northern offensive. When King Huiwen died, his widow the Queen Dowager Xuan (宣太后) acted as regent because the succeeding sons were deemed too young to govern. During the reign of King Zhaoxiang (r.306 – 251), the queen dowager apparently entered illicit relations with the Yiqu king and gave birth to two of his sons, but later tricked and killed the Yiqu king. Following that coup, the Qin army marched into Yiqu territory at the queen dowager's orders; the Qin annihilated the Yiqu remnants and thus came to possess the Ordos region. At this point the Qin built a wall around their new territories to defend against the true nomads even further north, incorporating the Wei walls. As a result, an estimated total of 1775 km of Qin walls (including spurts) extended from southern Gansu to the bank of the Yellow River in the Jungar Banner, close to the border with Zhao at the time.

The walls, known as Changcheng (長城) – literally "long walls", but often translated as "Great Wall" – were mostly constructed of tamped earth, with some parts built with stones. The walls were erected sparingly where natural barriers like ravines and rivers sufficed for defence, but long fortified lines were laid where such advantageous terrains did not exist. Often in addition to the wall, the defensive system included garrisons and beacon towers inside the wall, and watchtowers outside at regular intervals. In terms of defence, the walls were generally effective at countering cavalry shock tactics, but there are doubts as to whether these early walls were actually defensive in nature. Nicola Di Cosmo points out that the northern frontier walls were built far to the north and included traditionally nomadic lands, and so rather than being defensive, the walls indicate the northward expansions of the three northern states and their desire to safeguard their recent territorial acquisitions. This theory is supported by the archeological discovery of nomadic artifacts within the walls, suggesting the presence of pre-existing or conquered barbarian societies. It is entirely possible, as Western scholars like di Cosmo and Lattimore suggest, that nomadic aggression against the Chinese in the coming centuries was partly caused by Chinese expansionism during this period.

Qin dynasty (221–206 BC)
In 221BC, the state of Qin completed its conquest over the other Warring States and united China under its king Ying Zheng, who then proclaimed himself to be the First Emperor and became known in history as "Qin Shi Huang". These conquests, combined with the Legalist reforms started by Shang Yang in the 4th century BC, transformed China from a loose confederation of feudal states to an authoritarian empire. With the transformation, Qin became able to command a far greater assembly of labourers to be used in public works than the prior feudal kingdoms. Also, once unification was achieved, Qin found itself in possession of a large professional army with no more internal enemies to fight and thus had to find a new use for them. Soon after the conquests, in the year 215 BC, the emperor sent the famed general Meng Tian to the Ordos region to drive out the Xiongnu nomads settled there, who had risen from beyond the fallen marginal states along the northern frontier. Qin's campaign against the Xiongnu was preemptive in nature, since there was no pressing nomadic menace to be faced at the time; its aim was to annexe the ambiguous territories of the Ordos and to clearly define the Qin's northern borders. Once the Xiongnu were chased away, Meng Tian introduced 30,000 settler families to colonize the newly conquered territories.

Wall configurations were changed to reflect the new borders under the Qin. General Meng Tian erected walls beyond the northern loop of the Yellow River, effectively linking the border walls of Qin, Zhao, and Yan. Concurrent to the building of the frontier wall was the destruction of the walls within China that used to divide one warring state from another — contrary to the outer walls, which were built to stabilize the newly united China, the inner walls threatened the unity of the empire. In the following year, 214BC, Qin Shi Huang ordered new fortifications to be built along the Yellow River to the west of the Ordos while work continued in the north. This work was completed probably by 212BC, signalled by Qin Shi Huang's imperial tour of inspection and the construction of the Direct Road (直道) connecting the capital Xianyang with the Ordos. The result was a series of long walls running from Gansu to the seacoast in Manchuria.

Details of the construction were not found in the official histories, but it could be inferred that the construction conditions were made especially difficult by the long stretches of mountains and semi-desert that the Great Wall traversed, the sparse populations of these areas, and the frigid winter climate. Although the walls were rammed earth, so the bulk of the building material could be found in situ, transportation of additional supplies and labour remained difficult for the reasons named above. The Cambridge History of China posits that "for every man whom Meng Tian could put to work at the scene of actual construction, dozens must have been needed to build approaching roads and to transport supplies." This is supported by the Han dynasty statesman Zhufu Yan's description of Qin Shi Huang's Ordos project in 128BC: "... the land was brackish and arid, crops could not be grown on them. ... At the time, the young men being drafted were forced to haul boats and barges loaded with baggage trains upstream to sustain a steady supply of food and fodder to the front. ... Commencing at the departure point a man and his animal could carry thirty zhong (about 176 kg) of food supply, by the time they arrived at the destination, they merely delivered one dan (about 29 kg) of supply. ... When the populace had become tired and weary they started to dissipate and abscond. The orphans, the frail, the widowed and the seniors were desperately trying to escape from their appallingly derelict state and died on the wayside as they wandered away from their home. People started to revolt."

The settlement in the north continued up to Qin Shi Huang's death in 210BC, upon which Meng Tian was ordered to commit suicide in a succession conspiracy. Before killing himself, Meng Tian expressed regret for his walls: "Beginning at Lintao and reaching to Liaodong, I built walls and dug moats for more than ten thousand li; was it not inevitable that I broke the earth's veins along the way? This then was my offense."

Meng Tian's settlements in the north were abandoned, and the Xiongnu nomads moved back into the Ordos Loop as the Qin empire became consumed by widespread rebellion due to public discontent. Owen Lattimore concluded that the whole project relied upon military power to enforce agriculture on a land more suited for herding, resulting in "the anti-historical paradox of attempting two mutually exclusive forms of development simultaneously" that was doomed to fail.

Han dynasty (206 BC–220 AD)


In 202BC, the peasant-turned faction leader Liu Bang emerged victorious from the Chu–Han Contention that followed the rebellion that toppled the Qin dynasty, and proclaimed himself emperor of the Han dynasty, becoming known as Emperor Gaozu of Han (r.202 – 195) to posterity. Unable to address the problem of the resurgent Xiongnu in the Ordos region through military means, Emperor Gaozu was forced to negotiate with the Xiongnu for appeasement. In exchange for peace, the Han would offered tributes along with princesses to marry off to the Xiongnu chiefs. These diplomatic marriages would become known as heqin, and the terms specified that the Great Wall (determined to be either the Warring States period Qin state wall or a short stretch of wall south of Yanmen Pass) was to serve as the line across which neither party would venture. In 162BC, Gaozu's son Emperor Wen clarified the agreement, suggesting the Xiongnu chanyu held authority north of the Wall and the Han emperor held authority south of it. Sima Qian, the author of the Records of the Grand Historian, describes the result of this agreement as one of peace and friendship: "from the chanyu downwards, all the Xiongnu grew friendly with the Han, coming and going along the Long Wall". However, Chinese records show that the Xiongnu often did not respect the agreement, as the Xiongnu cavalry numbering up to a 100,000 made several intrusions into Han territory despite the intermarriage.

To Chinese minds, the heqin policy was humiliating and ran contrary to the Sinocentric world order like "a person hanging upside down", as the statesman Jia Yi (d. 169 BC) puts it. These sentiments manifested themselves in the Han court in the form of the pro-war faction, who advocated the reversal of Han's policy of appeasement. By the reign of Emperor Wu (r.141 – 87), the Han felt comfortable enough to go to war with the Xiongnu. After a botched attempt at luring the Xiongnu army into an ambush at the Battle of Mayi in 133 BC, the era of heqin-style appeasement was broken and the Han–Xiongnu War went into full swing.

As the Han–Xiongnu War progressed in favour of the Han, the Wall became maintained and extended beyond Qin lines. In 127BC, General Wei Qing invaded the much-contested Ordos region as far as the Qin fortifications set up by Meng Tian. In this way, Wei Qing reconquered the irrigable lands north of the Ordos and restored the spur of defences protecting that territory from the steppe. In addition to rebuilding the walls, archeologists believe that the Han also erected thousands of kilometres of walls from Hebei to Inner Mongolia during Emperor Wu's reign. The fortifications here include embankments, beacon stations, and forts, all constructed with a combination of tamped-earth cores and stone frontages. From the Ordos Loop, the sporadic and non-continuous Han Great Wall followed the northern edge of the Gansu Corridor through the cities of Wuwei, Zhangye, and Jiuquan, leading into the Juyan Lake Basin, and terminating in two places: the Yumen Pass in the north, or the Yang Pass to the south, both in the vicinity of Dunhuang. Yumen Pass was the most westerly of all Han Chinese fortifications – further west than the western terminus of the Ming Great Wall at Jiayu Pass, about 460 km to the east. The garrisons of the watchtowers on the wall were supported by civilian farming and by military agricultural colonies known as tuntian. Behind this line of fortifications, the Han government was able to maintain its settlements and its communications to the Western Regions in central Asia, generally secure from attacks from the north.

The campaigns against the Xiongnu and other nomadic peoples of the west exhausted the imperial treasury, and the expansionist policies were reverted in favour of peace under Emperor Wu's successors. The peace was largely respected even when the Han throne was usurped by the minister Wang Mang in 9AD, beginning a brief 15-year interregnum known as the Xin dynasty (9–23). Despite high tensions between the Xin and the Xiongnu resulting in the deployment of 300,000 men on the Great Wall, no major fighting broke out beyond minor raids. Instead, popular discontent led to banditry and, ultimately, full scale rebellion. The civil war ended with the Liu clan on the throne again, beginning the Eastern Han dynasty (25–220).

The restorer Emperor Guangwu (r.25 – 57) initiated several projects to consolidate his control within the frontier regions. Defence works were established to the east of the Yanmen Pass, with a line of fortifications and beacon fires stretching from Pingcheng County (present-day Datong) through the valley of the Sanggan River to Dai County, Shanxi. By 38 AD, as a result of raids by the Xiongnu further to the west against the Wei River valley, orders were given for a series of walls to be constructed as defences for the Fen River, the southward course of the Yellow River, and the region of the former imperial capital, Chang'an. These constructions were defensive in nature, which marked a shift from the offensive walls of the preceding Emperor Wu and the rulers of the Warring States. By the early 40sAD the northern frontiers of China had undergone drastic change: the line of the imperial frontier followed not the advanced positions conquered by Emperor Wu but the rear defences indicated roughly by the modern (Ming dynasty) Great Wall. The Ordos region, northern Shanxi, and the upper Luan River basin around Chengde were abandoned and left to the control of the Xiongnu. The rest of the frontier remained somewhat intact until the end of the Han dynasty, with the Dunhuang manuscripts (discovered in 1900) indicating that the military establishment in the northwest was maintained for most of the Eastern Han period.

Period of Disunity to the Sui dynasty (220–618)
Following the end of the Han dynasty in 220, China disintegrated into warlord states, which in 280 were briefly reunited under the Western Jin dynasty (265–316). There are ambiguous accounts of the Jin rebuilding the Qin wall, but these walls apparently offered no resistance during the Wu Hu uprising, when the nomadic tribes of the steppe evicted the Chinese court from northern China. What followed was a succession of short-lived states in northern China known as the Sixteen Kingdoms, until they were all consolidated by the Xianbei-led Northern Wei dynasty (386–535).

As Northern Wei became more economically dependent on agriculture, the Xianbei emperor made a conscious decision to adopt Chinese customs, including passive methods of frontier defence. In 423, a defence line over 2,000 li (1080 km) long was built to resist the Rouran; its path roughly followed the old Zhao wall from Chicheng County in Hebei Province to Wuyuan County, Inner Mongolia. In 446, 100,000 men were put to work building an inner wall from Yanqing, passing south of the Wei capital Pingcheng, and ending up near Pingguan on the eastern bank of the Yellow River. The two walls formed the basis of the double-layered Xuanfu–Datong wall system that protected Beijing a thousand years later during the Ming dynasty.

The Northern Wei collapsed in 535 due to civil insurrection to be eventually succeeded by the Northern Qi (550–575) in the east and Northern Zhou (557–580) in the west. Faced with the threat of the Göktürks from the north, from 552 to 556 the Qi built up to 3,000 li (about 1600 km) of wall from Shanxi to the sea at Shanhai Pass. Over the course of the year 555 alone, 1.8 million men were mobilized to build the Juyong Pass and extend its wall by 450 km through Datong to the eastern banks of the Yellow River. In 557 a secondary wall was built inside the main one. These walls were built quickly from local earth and stones or formed by natural barriers. Two stretches of the stone-and-earth Qi wall still stand in Shanxi today, measuring 3.3 m wide at their bases and 3.5 m high on average. In 577 the Northern Zhou conquered the Northern Qi and in 580 made repairs to the existing Qi walls. The Qi and Zhou walls mostly follow the later Ming wall line west of Gubeikou, and were also reconstructed by the Ming. In more recent times, the reddish remnants of the Zhou ramparts in Hebei gave rise to the nickname "Red Wall".

The Sui took power from the Northern Zhou in 581 before reuniting China in 589. Sui's founding emperor, Emperor Wen of Sui (r.581–604), carried out considerable wall construction in 581 in Hebei and Shanxi to defend against Ishbara Qaghan of the Göktürks. The new walls proved insufficient in 582 when Ishbara Qaghan avoided them by riding west to raid Gansu and Shaanxi with 400,000 archers. Between 585 to 588 Emperor Wen sought to close this gap by putting walls up in the Ordos Mountains (between Suide and Lingwu) and Inner Mongolia. In 586 as many as 150,000 men are recorded as involved in the construction. Emperor Wen's son Emperor Yang (r.604–618) continued to build walls. In 607–8 he sent over a million men to build a wall from Yulin to near Huhhot to protect the newly refurbished eastern capital Luoyang. Part of the Sui wall survives to this day in Inner Mongolia as earthen ramparts some 2.5 m high with towers rising to double that. The dynastic history of Sui estimates that 500,000 people died building the wall, adding to the number of casualties caused by Emperor Yang's projects including the aforementioned redesign of Luoyang, the Grand Canal, and two ill-fated campaigns against Goguryeo. With the economy strained and the populace resentful, the Sui dynasty erupted in rebellion and ended with the assassination of Emperor Yang in 618.

Tang dynasty (618–907)
Frontier policy under the Tang dynasty reversed the wall-building activities of most previous dynasties that had occupied northern China since the third century BC, and no extensive wall building took place for the next several hundred years.

Soon after the establishment of the Tang dynasty, during the reign of Emperor Taizong (r.626–649), the threat of Göktürk tribesmen from the north prompted some court officials to suggest drafting corvée labourers to repair the aging Great Wall. Taizong scoffed at the suggestion, alluding to the Sui walls built in vain: "The Emperor Yang of Sui made the people labor to construct the Great Wall in order to defend against the Turks, but in the end this was of no use." Instead of building walls, Taizong claimed he "need merely to establish Li Shiji in Jinyang for the dust on the border to settle." Accordingly, Taizong sent talented generals like Li Shiji with mobile armies to the frontier, while fortifications were mostly limited to a series of walled garrisons, such as the euphemistically-named "cities for accepting surrender" (受降城, shòuxiáng chéng) that were actually bases from which to launch attacks. As a result of this military strategy, the Tang grew to become one of the largest of all the Chinese empires, destroying the Göktürks of the Eastern Turkic Khaganate and acquiring territory stretching all the way to Kazakhstan.

Nevertheless, records show that in the Kaiyuan era (713–742) of Emperor Xuanzong's reign, the general Zhang Yue built a wall 90 li (48 km) to the north of Huairong (懷戎; present-day Huailai County, Hebei), although it remains unclear whether he erected new walls or only reinforced the existing Northern Qi walls.

The Great Wall, or the ruins of it, features prominently in the subset of Tang poetry known as biansai shi (邊塞詩, "frontier verse") written by scholar-officials assigned along the frontier. Emphasizing the poets' loneliness and longing for home while hinting at the pointlessness of their posts, these frontier verses are characterized by imagery of desolate landscapes, including the ruins of the now-neglected Great Wall — a direct product of Tang's frontier policy.

The northern walls of the Khitan, Jurchens, and Tanguts
After the Tang dynasty ended in 907, the northern frontier area remained out of Han Chinese hands until the establishment of the Ming dynasty in 1368. During this period, non-Han "conquest dynasties" ruled the north: the Khitan Liao dynasty (907–1125) and the succeeding Jurchen Jin dynasty (1115–1234) in the east and the Tangut Western Xia (1038–1227) in the west, all of which had built walls against the north.

In 907, the Khitan chieftain Abaoji succeeded in getting himself appointed khaghan of all Khitan tribes in the north, laying the foundations to what would officially become the Liao dynasty. In 936, the Khitan supported the Shanxi rebel Shi Jingtang in his revolt against the Shatuo Turkic Later Tang, which had destroyed the usurpers of the Tang in 923. The Khitan leader, Abaoji's second son Yelü Deguang, convinced Shi to found a new dynasty (the Later Jin, 936–946), and received the crucial border region known as the Sixteen Prefectures in return. With the Sixteen Prefectures, the Khitan now possessed all the passes and fortifications that controlled access to the plains of northern China, including the main Great Wall line.

Settling in the transitional area between agricultural lands and the steppe, the Khitans became semi-sedentary like their Xianbei predecessors of the Northern Wei, and started to use Chinese methods of defence. In 1026 walls were built through central Manchuria north of Nong'an County to the banks of the Songhua River. When the Jurchens, once Liao vassals, rose up to overthrow their masters and established the Jin dynasty, they continued Liao's wall-building activities with extensive work begun before 1138. Further wall construction took place in 1165 and 1181 under the Jin Emperor Shizhong, and later from 1192 to 1203 during the reign of his successor Emperor Zhangzong.

This long period of wall-building burdened the populace and provoked controversy. Sometime between 1190 to 1196, during Zhangzong's reign, the high official Zhang Wangong (張萬公) and the Censorate recommended that work on the wall be indefinitely suspended due to a recent drought, noting: "What has been begun is already being flattened by sandstorms, and bullying the people into defence works will simply exhaust them." However, Chancellor Wanyan Xiang (完顏襄) convinced the emperor of the walls' merits based on an optimistic cost estimate – "Although the initial outlay for the walls will be one million strings of cash, when the work is done the frontier will be secure with only half the present number of soldiers needed to defend it, which means that every year you will save three million strings of cash ... The benefits will be everlasting" – and so construction continued unabated. All this work created an extensive systems of walls, which consisted of a 700 km "outer wall" from Heilongjiang to Mongolia and a 1000 km network of "inner walls" north and northeast of Beijing. Together, they formed a roughly elliptical web of fortifications 1400 km in length and 440 km in diameter. Some of these walls had inner moats (from 10 to 60 m in width), beacon towers, battlements, parapets, and outward-facing semicircular platforms protruding from the wall — features that set the Jin walls apart from their predecessors.

In the west, the Tanguts took control of the Ordos region, where they established the Western Xia dynasty. Although the Xia were not traditionally known for building walls, in 2011 archeologists uncovered 100 km of walls at Ömnögovi Province in Mongolia in what had been Western Xia territory. Radiocarbon analysis showed that they were constructed from 1040 to 1160. The walls were as tall as 2.75 m at places when they were discovered, and may have been around 2 m taller originally. They were built with mud and saxaul (a desert shrub) in one section, and dark basalt blocks in another, suggesting that the rocks may have been quarried from nearby extinct volcanoes and transported to the construction site. Archaeologists have not yet found traces of human activity around this stretch of wall, which suggests that the Xia wall in this location may have been incomplete and not ready for use.

The old Great Walls as Song boundary lines
Han Chinese power during the tumultuous post-Tang era was represented by the Song dynasty (960–1279), which completed its unification of the Chinese states with the conquest of Wuyue in 971. Turning to the north after this victory, in 979 the Song eliminated the Northern Han, ultimate successors to the Later Jin, but were unable to take the Sixteen Prefectures from the Liao dynasty. As a result of Song's military aggression, relations between the Song and Liao remained tense and hostile. One of the battlegrounds in the Song–Liao War was the Great Wall Gap (長城口), so named because the southern Yan wall of the Warring States period crossed the Juma River here into Liao territory. The Great Wall Gap saw action in 979, 988–989, and 1004, and a Song fortress was built there in 980. Intermittent wars between the Song and the Liao lasted until January 1005, when a truce was called and led to the Treaty of Chanyuan. This agreement, among other things, required the Song to pay tribute to the Liao, recognized the Song and Liao as equals, and demarcated the Song–Liao border, the course of which became more clearly defined in a series of subsequent bilateral agreements. Several stretches of the old Great Walls, including the Northern Qi Inner Wall near the Hengshan mountain range, became the border between the Song and the Liao.

In the northwest, the Song were in conflict with the Western Xia, since they occupied what the Song considered as Chinese land lost during the Tang dynasty. The Song utilized the walls built during the reign of Qin's King Zhaoxiang of the Warring States period, making it the Song–Western Xia border, but the topography of the area was not as sharp and distinct as the Song–Liao defences to the east. The border general Cao Wei (曹瑋; 973–1030) deemed the Old Wall itself insufficient to slow a Tangut cavalry attack, and had a deep trench dug alongside. This trench, between 15 and 20 m in width and depth, proved an effective defence, but in 1002 the Tanguts caught the Song patrollers off guard and filled the trench to cross the Old Wall. Later, in 1042, the Tanguts turned the trench against the Song by removing the bridges over it, thereby trapping the retreating army of Ge Huaimin (葛懷敏) before annihilating it at the Battle of Dingchuan Fortress (定川寨).

Despite the war with the Western Xia, the Song also settled land disputes with them by referring to prior agreements, as with the Liao. However, soon after the Jin dynasty overthrew the Liao dynasty, the Jurchens sacked the Song capital in 1127 during the Jin–Song wars, causing the Song court to flee south of the Yangtze River. For the next two and a half centuries, the Great Wall played no role in Han Chinese geopolitics.

The onset of the Mongols


In the 13th century, the Mongol leader Genghis Khan, once a vassal of Jin, stood poised for the conquest of the Jin dynasty. In doing so, he hoped to avenge the earlier death of his great-uncle Ambakai, remove the indignity of his vassalage to those he considered inferior, and gain the riches of northern China. In the ensuing Mongol conquest of the Jin dynasty, the nomadic invaders avoided direct attacks on the Jin fortifications. Instead, when they could, the Mongols simply rode around the Jin walls; an effective example of this tactic is 1211, when they circumvented the substantial fortress in Zhangjiakou and inflicted a terrible defeat upon the Jin armies at the Battle of the Badger Mouth. The Mongols also took advantage of lingering Liao resentment against the Jin; the Khitan defenders of the garrisons along the Jin walls, such as those in Gubeikou, often preferred to surrender to the Mongols rather than fight them. The only major engagement of note along the main Great Wall line was at the heavily defended Juyong Pass: instead of laying siege, the Mongol general Jebe lured the defenders out into an ambush and charged in through the opened gates. In 1215, Genghis Khan besieged, captured, and sacked the Jin capital of Yanjing (modern-day Beijing). The Jin dynasty eventually collapsed following the siege of Caizhou in 1234. Western Xia had already fallen in 1227, and the Southern Song resisted the Mongols until 1279.

With that, the Yuan dynasty, established by Genghis Khan's grandson Khublai Khan, became the first foreign dynasty to rule all of China. Despite being the head of the Mongol Empire, Khublai Khan's rule over China was not free from the threat of the steppe nomads. The Yuan dynasty faced challenges from rival claimants to the title of Great Khan and from rebellious Mongols in the north. Khublai Khan dealt with such threats by using both military blockades and economic sanctions.

Although he established garrisons along the steppe frontier from the Juyan Lake Basin in the far west to Yingchang in the east, Khublai Khan and the Yuan emperors after him did not add to the Great Wall (except for the ornate Cloud Platform at Juyong Pass). When the Venetian traveller Marco Polo wrote of his experiences in China during the reign of Khublai Khan, he did not mention a Great Wall.

Early Ming walls and garrisons
In 1368, the Hongwu Emperor (Zhu Yuanzhang, r.1368–98) ousted the Mongol-led Yuan dynasty from China to inaugurate the Ming dynasty. The Mongols fled back to Mongolia, but even after numerous campaigns, the Mongol problem remained.

In the early years of his reign, Hongwu envisioned a border policy like the Tang and the Yuan before him, where mobile armies along the northern frontier guarded the safety of China. To this end he set up the "eight outer garrisons" close to the steppe and an inner line of forts more suitable for defence. The inner line was the forerunner to the Ming Great Wall. In 1373, as Ming forces encountered setbacks, Hongwu put more emphasis on defence and adopted Hua Yunlong's (華雲龍) suggestion to establish garrisons at 130 passes and other strategic points in the Beijing area. More positions were set up in the years up Hongwu's death in 1398, and watchtowers were manned from the Bohai Sea to Beijing and further onto the Mongolian steppes. These positions, however, were not for a linear defence but rather a regional one in which walls did not feature heavily, and offensive tactics remained the overarching policy at the time.

Hongwu's son, the Yongle Emperor (r.1402–24), continued his father's policy of active campaigning against the Mongols, and in 1421 moved the Ming capital from Nanjing in the south to Beijing in the north, partially to better manage the Mongol situation. Construction of walls in stone and earth began under Yongle's reign in strategic passes, when signal towers and ditch systems were also established. Yongle's reign also saw the rearrangement of the dynasty's frontiers that led to all but one of the eight outer garrisons being abolished to cut expenses, thereby sacrificing a vital foothold in the steppe transitional zone. After Yongle's death in 1424, the Ming abandoned the last garrison at Kaiping (the former Yuan capital also known as Xanadu) in 1430. The removal of these garrisons would have long-term consequences, as Ming foreign policy turned increasingly inward and defence became preferred over offence, especially after taking into consideration the cost to maintain the outlying garrisons.

Around 1442, a wall was erected by the Ming in Liaodong to protect Han settlers from a possible threat from the Jurched-Mongol Oriyanghan. In 1467–68, expansion of the wall provided further protection for the region from against attacks by the Jianzhou Jurchens in the northeast. An offshoot of the future main Great Wall line, this "Liaodong Wall" was of simple design: for the most part constructed by pouring mud between parallel rows of stakes, with moats dug on both sides, although stones and tiles were used in some parts.

Despite withdrawal from the steppe, the Ming military remained in a strong position until the Tumu Crisis in 1449, which caused the collapse of the early Ming security system. Over half of the campaigning Chinese army perished in the conflict, while the Mongols captured the Zhengtong Emperor. This military debacle shattered the Chinese military might that had so impressed and given pause to the Mongols since the beginning of the dynasty, and the Ming were on the defensive from this point on.

In the immediate aftermath of the disaster, the most pressing political concern caused by the capture of the emperor was resolved when the acting Minister of War Yu Qian (the actual minister having died at Tumu) installed the emperor's brother as the new Jingtai Emperor (r.1450–1459). Military tensions with the Oirats remained high during Jingtai's reign, as peace would have caused a great deal of political awkwardness for Jingtai and Yu Qian's faction, who benefited from putting Jingtai on the throne. To maintain a military presence while compensating for the loss of soldiers, fortifications, ditches, and ramparts were constructed in key passes, including at the Zijing Pass (紫荊關; through where the Mongols had entered during the Tumu Crisis), the Ningwu Pass (寧武關), and the Juyong Pass. The work undertaken in this period marked a major shift toward defensive construction.

The Ordos Wall
The deterioration of the Ming military position in the steppe transitional zone gave rise to nomadic raids into Ming territory, including the crucial Ordos region, on a level unprecedented since the dynasty's founding. To solve this problem, the Ming could either go on the offensive and re-establish their positions in the steppe, or concede the transitional zones to the nomads and maintain a defensive and accommodative policy. Over the late 15th and 16th centuries, the choice between the two options became the subject of fierce debate in the Chinese court and dissension that was sometimes exploited by various political factions to get rid of the opposition. The decision to build the first major Ming walls was the one of the outcomes of these debates. However, central policy alone did not decide whether the walls would be built, as various "defense commands" (邊鎮, biānzhèn) along the border possessed considerable autonomy to deal with the nomads, leading to a decentralized approach to wall-building along the frontier. Each wall-building project was designed to meet imminent or potential threats along short sections of the empire's northern border, never larger in scope than a single regional defence command, and were often as short as a few hundred meters. In most cases, frontier policy decisions of this period were made by the supreme commander or the grand coordinator in charge of the defence command, who would then send their proposals to the Ministry of War (兵部, Bīngbù) and the emperor for approval. If approved, funding for the project would be footed by the Ministry of War and the Ministry of Revenue (戶部, Hùbù). In essence, the Ming Great Wall was built in a piecemeal fashion by a number of regional commanders over a long period of time, not as one monumental project ordered by the central government.

As offensive action against the nomads became increasingly untenable due to a shortage of fighting men and military supplies, Yu Zijun (余子俊; 1429–1489) first proposed constructing a wall in the Ordos region in August 1471, but this went against the traditional offensive-based policies in place since the early Ming. Minister of War Bai Gui (白圭) had tried to implement an offensive solution since taking office in 1467, and he objected to Yu's proposal because of cost fears. On 20December 1472, amid reports of people fleeing the frontier provinces due to the harsh military levies imposed to finance offensive campaigns, Yu reasoned that his wall project would not be as costly as the offensive strategy, and that the wall would be a temporary measure that would allow the Ming to restore its military and economic strength. The court and emperor approved the plan, and the 1473 victory in the Battle of Red Salt Lake (紅鹽池) by Wang Yue (王越) deterred Mongol invasions long enough for Yu Zijun to complete his wall project in 1474. This wall, a combined effort between Yu Zijun and Wang Yue, stretched from present day Hengcheng (橫城) in Lingwu (northwestern Ningxia province) to Huamachi town (花馬池鎮) in Yanchi County, and from there to Qingshuiying (清水營) in northeastern Shaanxi, a total of more than 2000 li (about 1100 km) long. Along its length were 800 strong points, sentry posts, beacon-fire towers, and assorted defences. 40,000 men were enlisted for this effort, which was completed in several months at a cost of over one million silver taels. This defence system proved its initial worth in 1482, when a large group of Mongol raiders were trapped within the double lines of fortifications and suffered a defeat by the Ming generals. This was seen as a vindication of Yu Zijun's strategy of wall-building by the people of the border areas. By the mid-16th century, Yu's wall in the Ordos had seen expansion into an extensive defence system. It contained two defence lines: Yu's wall, called the "great border" (大邊, dàbiān), and a "secondary border" (二邊, èrbiān) built by Yang Yiqing (楊一清; 1454–1530) behind it.

Following the success of the Ordos walls, Yu Zijun proposed construction of a further wall that would extend from the Yellow River bend in the Ordos to the Sihaiye Pass (四海冶口; in present-day Yanqing County) near the capital Beijing, running a distance of more than 1300 li (about 700 km). The project received approval in 1485, but Yu's political enemies harped on the cost overruns and forced Yu to scrap the project and retire the same year. For more than 50 years after Yu's resignation, political struggle prevented major wall constructions on a scale comparable to Yu's Ordos project.

However, wall construction continued regardless of court politics during this time. The Ordos walls underwent extension, elaboration, and repair well into the 16th century. Brick and stone started to replace tamped earth as the wall building material, because they offered better protection and durability. This change in material gave rise to a number of necessary accommodations with regard to logistics, and inevitably a drastic increase in costs. Instead of being able to draw on local resources, building projects now required brick-kilns, quarries, and transportation routes to deliver bricks to the work site. Also, masons had to be hired since the local peasantry proved inadequate for the level of sophistication that brick constructions required. Work that originally could be done by one man in a month with earth now required 100 men to do in stone.

The Walls of Xuanfu–Datong and the western reaches
With the Ordos now adequately fortified, the Mongols avoided its walls by riding east to invade Datong and Xuanfu (宣府; present-day Xuanhua, Hebei Province), which were two major garrisons guarding the corridor to Beijing where no walls had been built. The two defence lines of Xuanfu and Datong left by the Northern Qi and the early Ming had deteriorated by this point, and for all intents and purposes the inner line was the capital's main line of defence. Starting from the 1520s, proposals were made to strengthen the defences of this region, but the plan was disrupted by the local populace's resistance to the prospect of labour; only in the 1540s did work proceed in earnest.

From 1544 to 1549, a defensive building program took place on a scale unprecedented in Chinese history. The project was led by Weng Wanda (翁萬達; 1498–1552), the Supreme Commander of the Xuan–Da defence area (宣大總督), which was responsible for the Xuanfu, Datong, and Shanxi areas. Troops were re-deployed along the outer line, new walls and beacon towers were constructed, and fortifications were restored and extended along both lines. Firearms and artillery were mounted on the walls and towers during this time, for both defence and signalling purposes. The project's completion was announced in the sixth month of 1548, but the walls were steadily augmented for a time after that. At its height, the Xuan–Da portion of the Great Wall totalled about 850 km of wall, with some sections being doubled-up, tripled, or even quadrupled. The outer frontier was now protected by a wall called the "outer border" (外邊, wàibiān) that extended 380 km from the Yellow River's edge at the Piantou Pass (偏頭關) along the Inner Mongolia border with Shanxi into Hebei province; the "inner border" wall (內邊, nèibiān) ran southeast from Piantou Pass for some 400 km, ending at the Pingxing Pass; a "river wall" (河邊, hébiān) also ran from the Piantou Pass and followed the Yellow River southwards for about 70 km.

As with Yu Zijun's wall in the Ordos, the Mongols shifted their attacks away from the newly strengthened Xuan–Da sector to less well-protected areas. In the west, Shaanxi province became the target of nomads riding west from the Yellow River loop. The westernmost fortress of Ming China, the Jiayu Pass, saw substantial enhancement with walls starting in 1539, and from there border walls were built discontinuously down the Gansu Corridor to Wuwei, where the low earthern wall split into two. The northern section passed through Zhongwei and Yinchuan, where it met the western edge of the Yellow River loop before connecting with the Ordos walls, while the southern section passed through Lanzhou and continued northeast to Dingbian. The origins and the exact route of this so-called "Tibetan loop" are still not clear.

In the east, the Tümed Mongols under Altan Khan raided Sihaiye and Dabaiyang (大白陽) in the seventh month of 1548. These points were much further east than previous raids and much closer to Beijing. The terrain there proved difficult to traverse, and so fortifications were not seen as urgently needed before the raids. In response, Weng Wanda proposed to close the gaps by connecting the walls of Xuan–Da with the signal towers of the eastern Jizhou defence command (薊州鎮). Only one sixth of the 436,000 liang of silver demanded for this project was alloted, and Weng Wanda supervised only briefly before leaving office on the death of his father.

The Great Wall outside Beijing
In 1550, having once more been refused a request for trade, Altan Khan invaded the Xuan–Da region. However despite several attempts, he could not take Xuanfu due to Weng Wanda's double fortified line while the garrison at Datong bribed him to not attack there. Instead of continuing to operate in the area, he circled around Weng Wanda's wall to the relatively lightly defended Gubeikou, northeast of Beijing. From there Altan Khan passed through the defences and raided the suburbs of Beijing. The Ming court put up minimal resistance and watched the suburbs burn as they waited for reinforcements to drive the invaders out. According to one contemporary source, the raid took more than 60,000 lives, an additional 40,000 people became prisoners, and one million head of livestock died. As a response to this raid, the focus of the Ming's northern defences shifted from the Xuan–Da region to the Jizhou and Changping Defence Commands (昌平鎮) where the breach took place. Later in the same year, the dry-stone walls of the Ji–Chang area were replaced by stone and mortar. These allowed the Chinese to build on steeper, more easily defended slopes and facilitated construction of features such as ramparts, crenelations, and peepholes. The effectiveness of the new walls was demonstrated in the failed Mongol raid of 1554, where raiders expecting a repeat of the events of 1550 were surprised by the higher wall and stiff Chinese resistance.

The success of the wall did not always translate into political success for its builders. Detractors cited its high costs and the drain on military manpower as reasons for their opposition and in 1557 the Grand Coordinator Wu Jiahui (吳嘉會) was jailed on charges of faulty and wasteful wall-building. Construction thereafter had to be low-key: the Supreme Commander of Shanxi (山西總督), Liu Tao (劉燾), minimized political attention to himself by claiming that he was "building through non-building."

In 1567 Qi Jiguang and Tan Lun, noted generals who fought against the wokou or coastal pirates, were reassigned to manage the Ji and Chang Defense Commands and step up the defences of the capital region. They submitted an ambitious proposal to build 3,000 brick towers along the Great Wall, and manoeuvred their way out of political opposition through the efforts of their allies at the imperial court. Although the number of towers was later scaled back to 1200, the project, which started in 1569 and lasted two years, marked the first large-scale use of hollow watchtowers on the Wall. Up until this point, most previous towers along the Great Wall had been solid, with a small hut on top for a sentry to take shelter from the elements and Mongol arrows. In contrast, the Ji–Chang towers built from 1569 onwards were hollow brick structures, allowing soldiers interior space to live, store food and water, stockpile weapons, and take shelter from Mongol arrows.

Altan Khan eventually made peace with China when it opened border cities for trade in 1571, alleviating the Mongol need to raid. This, coupled with Qi and Tan's efforts to secure the frontier, brought a period of relative peace along the border. However, minor raids still happened from time to time when the profits of raiding outweighed the profits of trade, and so wall-building continued.

On 6July 1576, a minor Mongol raid broke through a small gap in the Wall and resulted in the death of several high ranking border officials in the vicinity of Simatai, 8 mi east of Gubeikou. After this incident and starting in 1577, the Ming became committed to closing all gaps along the frontier around Beijing whilst strengthening the walls. As a result, the earthen defences around Beijing were torn down and replaced by ones built with stone bricks and sanhetu (三合土), an early sort of concrete made of lime, clay tiles, and sand. Areas of difficult terrain once considered impassible were also walled off, leading to the well-known vistas of a stone-faced Great Wall snaking over dramatic landscapes that tourists still see today.

Except for a lull in the 1590s due to resources being diverted to deal with the Japanese invasions of Korea, wall construction continued until the demise of the Ming dynasty in 1644.

The Wall and the fall of the Ming
The last decades of the Ming saw famines, floods, economic chaos, rebellions, and invasions. In 1618, the upstart Jianzhou Jurchen leader Nurhaci united the tribes of Manchuria and declared war on the Ming. After the Fushun garrison within the Liaodong Wall surrendered to Nurhaci the next year, the Ming court assembled a four-pronged Chinese–Korean army numbering above a 100,000 men to contain him, but they were catastrophically defeated at the Battle of Sarhu. Nurhaci made substantial progress in his conquest of Liaodong until he was mortally wounded at the 1626 Battle of Ningyuan by Yuan Chonghuan. He was succeeded by his son Hung Taiji, who worked to undermine Yuan Chonghuan by spreading rumours of Yuan's collaboration with the Jurchens. To drive the point home, Hung Taiji sent an army around Ningyuan through Mongol territories to breach the Great Wall pass at Xifengkou in the fall of 1629, taking advantage of a rift in the Ming ranks due to Yuan Chonghuan's execution of his fellow commander Mao Wenlong. This was the first time the Jurchens had broken through the Great Wall into China proper since the troubles in the northeast began. Yuan Chonghuan hastily sent an army to drive off the raiders from the walls of Beijing, but political damage had already been done. Yuan Chonghuan was accused of treason for letting this happen, and in 1630 he was executed by slow dismemberment while his family were exterminated or exiled.

Following Hung Taiji's raid, regular garrison troops in the western defence zones along the Great Wall were sent east to defend the capital, which had the unintended consequence of instigating more instability. The regions of Shaanxi had already been afflicted by adverse weather, heavy taxation, and fiscal mismanagement, so the removal of a substantial military presence encouraged the inhabitants to turn to banditry and rebellion; the remaining garrison forces, already unpaid and resentful, saw little choice but to throw in their lot with the rebels. A prominent leader who rose from the ranks of the rebels was Li Zicheng, the self-titled "Dashing Prince" (闖王, Chuǎng Wáng) who came to dominate Central China by 1642. Throughout his rise there were several occasions on which he could have been extinguished by the Ming, but Jurchen breaches of the Great Wall – the Jurchens had raided across the Great Wall several times since 1629, including in 1634, 1638, and 1642 – distracted the Ming court's attention. The Ming were not able to effectively deal with the simultaneous internal and external threats, much less maintain a consistent defence along the Great Wall. In 1635 Hung Taiji renamed his people the Manchus and declared himself the emperor of a new Qing dynasty the following year. However, the Manchus were not yet willing to launch an invasion of conquest against the Ming; as Hung Taiji remarked in 1642, "The Shanhai Pass cannot be taken."

In the first months of 1644, Li Zicheng, having consolidated control over his home province Shaanxi, declared himself the founder of a new Shun dynasty, and marched against the Ming court in Beijing. His invasion route brought the Shun army along the Great Wall to neutralize its heavily fortified garrisons. In this effort Li was met with next to no resistance as most garrisons surrendered to the Shun with no major fighting, except at the Ningwu Pass where the general Zhou Yuji (周遇吉) fought to the death. By April17, both the major garrisons at Datong and Xuanfu had surrendered to Li Zicheng, and most Ming hopes were placed on the last Great Wall pass at Juyong and its defender Tang Tong (唐通). However, just as the Ming court was discussing the means of increasing provisions to Juyong Pass, it received word that Tang Tong had surrendered and let the Shun army through on April21. With all options exhausted, the Ming emperor Chongzhen hanged himself as the Shun army entered Beijing on April25, 1644.

The largest remaining Ming fighting force in North China at the time of Beijing's fall was Wu Sangui's 40,000-man frontier force, who had abandoned the Ningyuan garrison to come to the emperor's aid. Halfway to Beijing, Wu received news of Chongzhen's death, so he went back to garrison the Shanhai Pass, the eastern terminus of the main Great Wall line. He and his men were now caught between the rebels within the Great Wall and the Manchus without. After some deliberation, Wu Sangui decided to resist the new Shun regime, having heard that Li Zicheng had ordered Wu's family executed. On May3 and May10 Wu Sangui twice defeated the Shun vanguard led by the turncoat Tang Tong, but he knew that his force alone was insufficient to fight Li Zicheng's main army. Wu Sangui wrote to the Manchus for help, promising "great profits" if they assisted him in defeating the rebels. The Manchu prince-regent Dorgon (Hung Taiji had died in 1643) determined that this was the opportunity to claim the Mandate of Heaven for the Qing. Dorgon made clear in his reply that the Manchus would help Wu Sangui, but Wu would have to submit to the Qing; Wu had little choice but to accept.

On May27, as the Shun army approached the Shanhai Pass from the south, Wu Sangui opened the gates to let the Qing army through the pass from the north. Up to this point the Battle of Shanhai Pass between Li Zicheng and Wu Sangui had been moving in Li's favour, but the sudden appearance of the Manchu bannermen decisively routed the Shun forces. Having thus entered through the Great Wall, the Manchus seized Beijing on June5. They eventually defeated both the rebel-founded Shun dynasty and the remaining Ming resistance, establishing Qing rule over all of China.

Opinions about the Wall's role in the Ming dynasty's downfall is mixed. Historians such as Arthur Waldron and Julia Lovell are critical of the whole wall-building exercise in light of its ultimate failure in protecting China; the former compared the Great Wall with the failed Maginot Line of the French in World War II. However, independent scholar David Spindler notes that the Wall, being only part of a complex foreign policy, received "disproportionate blame" because it was the most obvious relic of that policy.

Qing dynasty (1644–1911)
The usefulness of the Great Wall as a defence line against northern nomads became questionable under the Qing dynasty, since their territory encompassed vast areas inside and outside the wall: China proper, Manchuria, and Mongolia were all under Qing control. So instead, the Great Wall became the means to limit Han Chinese movement into the steppes. In the case of Manchuria, considered to be the sacred homeland by the ruling Manchu elites, some parts of the Ming Liaodong Wall were repaired so it could serve to control Han Chinese movement into Manchuria alongside the newly erected Willow Palisade.

Culturally, the wall's symbolic role as a line between civilized society and barbarism was suppressed by the Qing, who, as "nomads" from Manchuria, were keen to weaken the Han culturalism that had been propagated by the Ming. As a result, no special attention was paid to the Great Wall until the mid-Qing dynasty, when Westerners started to show interest in the structure.

Western appreciation of the Wall


"On the 7th of October 1834, we arrived at the Great Wall, so highly extolled by those who know nothing about it, and so emphatically described by those who have never seen it. This and other wonders of China should only be seen in pictures to maintain their reputation." 

The notion of a colossal wall in Asia existed in the Middle East and the West even before the first Europeans arrived in China by sea. The late antiquity historian Ammianus Marcellinus (330?–395?) mentioned "summits of lofty walls" enclosing the land of Seres, the country that the Romans believed to be at the eastern end of the Silk Road. In legend, the tribes of Gog and Magog were said to have been locked out by Alexander the Great with walls of steel. Later Arab writers and travellers, such as Rashid-al-Din Hamadani (1248–1318) and Ibn Battuta (1304–377), would erroneously identify the Great Wall in China with the walls of the Alexander romances. This indicated that Arabs may have heard about China's Great Wall during earlier periods of China's history, and associated it with the wall in the Gog and Magog legend, a tale that found its way into the Quran.

Soon after Europeans reached Ming China in the early 16th century, accounts of the Great Wall started to circulate in Europe, even though no European would see it with their own eyes for another century. The work A Treatise of China and the Adjoyning Regions by Gaspar da Cruz (c. 1520–70) offered an early discussion of the Great Wall in which he noted, "a Wall of an hundred leagues in length. And some will affirme to bee more than a hundred leagues." Another early account written by Bishop Juan González de Mendoza (1550–1620) reported a wall five hundred leagues long, but suggested that only one hundred leagues were man-made, with the rest natural rock formations. The journals of the noted Jesuit Matteo Ricci (1552–1610) show that Ricci mentioned the Great Wall once in his diary, noting the existence of "a tremendous wall four hundred and five miles long" that formed part of the northern defences of the Ming Empire.

Europeans first witnessed the Great Wall in the early 1600s. Perhaps the first recorded instance of a European actually entering China via the Great Wall came in 1605, when the Portuguese Jesuit brother Bento de Góis reached the northwestern Jiayu Pass from India. Ivan Petlin's 1619 deposition for his Russian embassy mission offers an early account based on a first-hand encounter with the Great Wall, and mentions that in the course of the journey his embassy travelled alongside the Great Wall for ten days.

Early European accounts were mostly modest and empirical, closely mirroring contemporary Chinese understanding of the Wall. However, when the Ming Great Wall began to take on a shape still recognizable today, foreign accounts of the Wall slid into hyperbole. In the Atlas Sinensis published in 1665, the Jesuit Martino Martini described elaborate but atypical stretches of the Great Wall and generalized such fortifications across the whole northern frontier. Furthermore, Martini erroneously identified the Ming Wall as the same wall built by Qin Shi Huang in the 3rd century BC, thereby exaggerating both the Wall's antiquity and its size. This misconception was compounded by the China Illustrata of Father Athanasius Kircher (1602–80), which provided pictures of the Great Wall as imagined by a European illustrator. All these and other accounts from missionaries in China contributed to the Orientalism of the eighteenth century, in which a mythical China and its exaggerated Great Wall feature prominently. The French philosopher Voltaire (1694–1774), for example, frequently wrote about the Great Wall, although his feelings towards it oscillate between unreserved admiration and condemnation of it as a "monument to fear". The ill-fated Macartney Embassy of 1793 passed through the Great Wall at Gubeikou on the way to see the Qianlong Emperor, who was vacationing in Manchuria at the time. One of the embassy's members, John Barrow, later founder of the Royal Geographical Society, spuriously calculated that the amount of stone in the Wall was equivalent to "all the dwelling houses of England and Scotland" and would suffice to encircle the Earth at the equator twice. The illustrations of the Great Wall by Lieutenant Henry William Parish during this mission would be reproduced in influential works such as Thomas Allom's 1845 China, in a series of views.

Exposure to such works brought many foreign visitors to the Great Wall after China opened its borders as a result of the nation's defeat in the First (1839–1842) and Second Opium Wars (1856–1860) at the hands of Britain and the other western powers. The Juyong Pass near Beijing and the "Old Dragon Head," where the Great Wall meets the sea at the Shanhai Pass, proved popular destinations for these wall watchers.

The travelogues of the later 19th century in turn further contributed to the elaboration and propagation of the Great Wall myth. Examples of this myth's growth are the false but widespread belief that the Great Wall of China is visible from the Moon or Mars.

Modern China (1911–present)
The Xinhai Revolution in 1911 forced the abdication of the last Qing Emperor Puyi and ended China's last imperial dynasty. The revolutionaries, headed by Sun Yat-sen, were concerned with creating a modern sense of national identity in the chaotic post-imperial era. In contrast to Chinese academics such as Liang Qichao, who tried to counter the West's fantastic version of the Great Wall, Sun Yat-sen held the view that Qin Shi Huang's wall preserved the Chinese race, and without it Chinese culture would not have developed enough to expand to the south and assimilate foreign conquerors. Such an endorsement from the "Father of Modern China" started to transform the Great Wall into a national symbol in the Chinese consciousness, though this transformation was hampered by conflicting views of nationalism with regard to the nascent "new China."

The failure of the new Republic of China fanned disillusionment with traditional Chinese culture and ushered in the New Culture Movement and the May Fourth Movement of the mid-1910s and 1920s that aimed to dislodge China's future trajectory from its past. Naturally, the Great Wall of China came under attack as a symbol of the past. An example, an influential writer of this period, Lu Xun, harshly criticized the "mighty and accursed Great Wall" in a short essay: "In reality, it has never served any purpose than to make countless workers labour to death in vain ... [It] surrounds everyone."

The Great Wall itself suffered battle damage in the tumultuous Warlord Era of Republican China (1916–28). The stretches near Shanhai Pass featured in both the First (1922) and Second Zhili–Fengtian War (1924), when the Manchuria-based Fengtian clique vied to control the civilian Beiyang Government against the Hebei-based Zhili clique. While Fengtian forces overran the Shanhai Pass early in the First Zhili–Fengtian War, the Second saw the Zhili clique hold the pass until the Beijing Coup behind Zhili lines caused the defenders to waver and brought a swift conclusion to the war.

Sino-Japanese conflict (1931–45) gave the Great Wall a new lease of life in the eyes of the Chinese. During the 1933 defence of the Great Wall, inadequately-equipped Chinese soldiers held off double their number of Japanese troop for several months. Using the cover of the Great Wall, the Chinese – who were at times only armed with broadswords – were able to beat off a Japanese advance that had the support of aerial bombardment. With the Chinese forces eventually overrun, the subsequent Tanggu Truce stipulated that the Great Wall was to become a demilitarized zone separating China and the newly created Japanese puppet state of Manchukuo. Even so, the determined defence of the Great Wall made it a symbol of Chinese patriotism and the resoluteness of the Chinese people. The Chinese Communist leader Mao Zedong picked up this symbol in his poetry during his "Long March" escaping from Kuomintang prosecution. Near the end of the trek in 1935, Mao wrote the poem "Mount Liupan" that contains the well-known line that would be carved in stone along the Great Wall in the present day: "Those who fail to reach the Great Wall are not true men" (不到长城非好汉). Another noteworthy reference to the Great Wall is in the song "March of the Volunteers" from the 1935 film Sons and Daughters in a Time of Storm. The song enjoyed continued popularity in China, and was selected as the national anthem of the newly established People's Republic of China (PRC) in 1949 when the communists emerged victorious from the Chinese Civil War.

In 1952, the scholar-turned-bureaucrat Guo Moruo laid out the first modern proposal to repair the Great Wall. Five years later, the renovated Badaling became the first section to be opened to the public since the establishment of the PRC. The Badaling Great Wall has since become a staple stop for foreign dignitaries who come to China, beginning with Nepali prime minister Bishweshwar Prasad Koirala in 1960, and most notably the American president Richard Nixon in his historic 1972 visit to China. To date, Badaling is still the most visited stretch of the Great Wall.

Other stretches did not fare so well. During the Cultural Revolution (1966–76), hundreds of kilometres of the Great Wall — already eroded by wind and rain — were deliberately destroyed by fervent Red Guards who regarded it as part of the Four Olds to be eradicated in the new China. Quarrying machines and even dynamite were used to dismantle the Wall, and the pilfered materials were used for construction.

As China opened up in the 1980s, reformist leader Deng Xiaoping initiated the "Love our China and restore our Great Wall" campaign (爱我中华，修我长城) to repair and preserve the Great Wall. The Great Wall was designated as a UNESCO World Heritage Site in 1987. However, while tourism boomed over the years, slipshod restoration methods have left sections of the Great Wall near Beijing "looking like a Hollywood set". The less prominent stretches of the Great Wall did not get as much attention. In 2002 the New York-based World Monuments Fund put the Great Wall on its list of the World's 100 Most Endangered Sites. In 2003 the Chinese government began to enact laws to protect the Great Wall.

Historiography
In China, one of the first individuals to attempt a multi-dynastic history of the Great Wall was the 17th century scholar Gu Yanwu. More recently, in the 1930s and 1940s, Wang Guoliang (王國良) and Shou Pengfei (壽鵬飛) produced exhaustive studies that culled extant literary records to date and mapped the courses of early border walls. However, ultimately these efforts were based solely on written records that contain obscure place names and elusive literary references.

The rise of modern archeology has contributed much to the study of the Great Wall, either in corroborating existing research or refuting it. However these efforts do not yet give a full picture of the Great Wall's history, as many wall sites dating to the Period of Disunity (220–589) had been overlaid by the extant Ming Great Wall.

Western scholarship of the Great Wall has, until recently, been affected by misconceptions derived from traditional accounts of the Wall. When the Jesuits brought back the first reports of the Wall to the West, European scholars were puzzled that Marco Polo did not mention the presumably perennial "Great Wall" in his Travels of Marco Polo. Some 17th century scholars reasoned that the Wall must have been built in the Ming dynasty, after Marco Polo's departure. However, this view was soon overtaken by another that argued, against Polo's own account, that the Venetian merchant had come to China from the south and so did not come into contact with the Wall. Thus, Father Martino Martini's mistaken claim that the Wall had "lasted right up to the present time without injury or destruction" since the time of Qin was accepted as fact by the 18th century philosophes.

Since then, many scholars have operated under the belief that the Great Wall continually defended China's border against the steppe nomads for two thousand years. For example, the 18th century sinologist Joseph de Guignes assigned macrohistorical importance to such walls when he advanced the theory that the Qin construction forced the Xiongnu to migrate west to Europe and, becoming known as the Huns, ultimately contributed to the decline of the Roman Empire. Some have attempted to make general statements regarding Chinese society and foreign policy based on the conception of a perennial Great Wall: Karl Marx had the Wall represent the stagnation of the Chinese society and economy, Owen Lattimore supposed that the Great Wall demonstrated a need to divide the nomadic way of life from the agricultural communities of China, and John K. Fairbank posited that the Wall played a part in upholding the Sinocentric world order.

Despite the significance that the Great Wall seemed to have, scholarly treatment of the Wall itself remained scant during the 20th century. Joseph Needham bemoaned the dearth when he was compiling the section on walls for his Science and Civilization in China: "There is no lack of travelers' description of the Great Wall, but studies based on modern scholarship are few and far between, whether in Chinese or Western languages." In 1990, Arthur Waldron published the influential The Great Wall: From History to Myth, where he challenged the notion of a unitary Great Wall maintained since antiquity, dismissing it as a modern myth. Waldron's approach prompted a re-examination of the Wall in Western scholarship. Still, as of 2008, there is not yet a full authoritative text in any language that is devoted to the Great Wall. The reason for this, according to The New Yorker journalist Peter Hessler, is because the Great Wall fits into neither the study of political institutions (favoured by Chinese historians) nor the excavation of tombs (as favoured by Chinese archeologists). However, the void left by academia is being filled by independent research from Great Wall enthusiasts such as ex-Xinhua reporter Cheng Dalin (成大林) and self-funded scholar David Spindler.