History of the Great Wall of China
The history of the Great Wall of China began when fortifications built by various states during the Spring and Autumn (771–476BC) and Warring States periods (475–221BC) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221–206BC) against incursions by nomads from Inner Asia. The walls were built of rammed earth, constructed using forced labour, and by 212 BC ran from Gansu to the coast of southern Manchuria.

Later dynasties adopted different policies towards northern frontier defense. The Han (202BC – 220AD), the Northern Qi (550–574), the Jurchen-ruled Jin (1115–1234), and particularly the Ming (1369–1644) were among those that rebuilt, re-manned, and expanded the Walls, although they rarely followed Qin's routes. The Han extended the fortifications furthest to the west, the Qi built about  of new walls, while the Sui mobilised over a million men in their wall-building efforts. Conversely, the Tang (618–907), the Song (960–1279), the Yuan (1271–1368), and the Qing (1644–1912) mostly did not build frontier walls, instead opting for other solutions to the Inner Asian threat like military campaigning and diplomacy.

Although a useful deterrent against raids, at several points throughout its history the Great Wall failed to stop enemies, including in 1644 when the Qing troops marched through the gates of the Shanhai Pass and replaced the most ardent of the wall-building dynasties, the Ming, as rulers of China proper.

The Great Wall of China visible today largely dates from the Ming dynasty, as they rebuilt much of the wall in stone and brick, often extending its line through challenging terrain. 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. For long an object of fascination for foreigners, the wall is now a revered national symbol 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 differences 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.

According to the model by sinologist Karl August Wittfogel, 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 Mongoliathe 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 Looptechnically 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 Riverthe Hetao, the Ordos Desert, and the Loess Plateauprovided no natural barriers on the approach to the Wei River valley, 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 is home to 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 forest peoples 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  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 Hexi 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 Hexi 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 corridorthe Yumen Pass during Han times and the Jiayu Pass during the Ming dynasty and thereafter.

Pre-imperial China (7th century–221 BC)

One of 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. 827782BC) of the Western Zhou dynasty (1046771BC), 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 BC), 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–256BC). Most importantly, the fall of Western Zhou redistributed power to the states that had acknowledged Zhou's nominal rulership. The rule of the Eastern Zhou dynasty was 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,  of which were excavated in southern Henan province in the modern era. However the Chu border fortifications consisted of many individual mountain fortresses; they do not constitute to a lengthy, single wall.  The State of Qi also had fortified borders up by the 441BC, 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 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. Where natural barriers like ravines and rivers sufficed for defence, the walls were erected sparingly, 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.

Great Wall of Yan 
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 Jiping, King Zhao of Yan (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. The ruins in Jianping County, Chaoyang, are its best existing section. Ruins of the Yan Great Wall were also found close to the Ming Great Wall at Badaling, Changping, northeast of Beijing.

A southern Yan wall was erected to defend against the Zhao; it was southwest of present-day Beijing and ran parallel to the Juma River for several dozen miles.

Great Wall of Zhao  
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 BC. In the process, he constructed the northernmost fortified frontier deep in nomadic territory. The Zhao walls were dated in the 1960s to be from King Wuling's reign: a southern long wall in northern Henan encompassing the 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 a third, northernmost line along the southern slopes of the Yin Mountains, extending from Qinghe in the east, passing north of Hohhot, and into Baotou.

Great Wall of Qin  
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 BC, and King Huiwen of Qin (r.338–311BC) 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–251BC), 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  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.

Qin dynasty (221–206 BC)

In 221BC, the state of Qin completed its conquest over the other Warring States and united China under Qin Shi Huang, the first emperor of China. 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 annex 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 anothercontrary 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 most of the walls were of 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 sinologist Derk Bodde posits in The Cambridge History of China 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 ) of food supply, by the time they arrived at the destination, they merely delivered one dan (about ) 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 of 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 former peasant 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–195BC) to posterity. Unable to address the problem of the resurgent Xiongnu in the Ordos region through military means, Emperor Gaozu was forced to appease the Xiongnu. In exchange for peace, the Han 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 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–87BC), 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 Hexi 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  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 (923). 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 (25220).

The restorer Emperor Guangwu (r.25–57AD) initiated several projects to consolidate his control within the frontier regions. Defense 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 (265316). There are ambiguous accounts of the Jin rebuilding the Qin wall, but these walls were largely inconsequential during the upheaval of the Five Barbarians, as the tribespeople that evicted the Jin court from northern China had long been living within the Chinese interior. 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 (386535).

Northern Wei Great Wall  
As Northern Wei became more economically dependent on agriculture, the Xianbei emperors made a conscious decision to adopt Chinese customs, including passive methods of frontier defence. In 423, a defence line over 2,000 li () 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 also built Six Frontier Towns to protect the Hetao meander against northern invasions.

Northern Qi and Northern Zhou 

The Northern Wei collapsed in 535 due to civil insurrection to be eventually succeeded by the Northern Qi (550575) and Northern Zhou (557580). 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 ) 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  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  wide at their bases and  high on average. In 577 the Northern Zhou conquered the Northern Qi and in 580 made repairs to the existing Qi walls. The route of the Qi and Zhou walls would be mostly followed by the later Ming wall west of Gubeikou, which includes reconstructed walls from Qi and Zhou. In more recent times, the reddish remnants of the Zhou ramparts in Hebei gave rise to the nickname "Red Wall".

Sui dynasty  
The Sui took power from the Northern Zhou in 581 before reuniting China in 589. Sui's founding emperor, Emperor Wen of Sui (r.581604), 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 and 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.604618) continued to build walls. In 607608 he sent over a million men to build a wall from Yulin to near Hohhot to protect the newly refurbished eastern capital Luoyang. Part of the Sui wall survives to this day in Inner Mongolia as earthen ramparts some  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.626649), 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 modern-day Kazakhstan.

Nevertheless, records show that in the Kaiyuan era (713742) of Emperor Xuanzong's reign, the general Zhang Yue built a wall 90 li () 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 Walla direct product of Tang's frontier policy.

Northern Song (960–1127)

Han Chinese power during the tumultuous post-Tang era was represented by the Song dynasty (9601279), 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, 988989, 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 (; 9731030) deemed the Old Wall itself insufficient to slow a Tangut cavalry attack, and had a deep trench dug alongside. This trench, between  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.

Liao, Western Xia, Jin, and Yuan dynasties (907–1368)

After the Tang dynasty ended in 907, the northern frontier area remained outside the control of Han-ruled regimes until the establishment of the Ming dynasty in 1368. During this period, non-Han dynasties of China ruled the north: the Khitan-led Liao dynasty (9071125) and the succeeding Jurchen-led Jin dynasty (11151234) in the east and the Tangut-led Western Xia dynasty (10381227) in the west, all of which had built walls against the north.

Liao dynasty frontier 
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-led 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, 936946), 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.

The two walls of Jin dynasty
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 Shizong, 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 and 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  "outer wall" from Heilongjiang to Outer Mongolia and a  network of "inner walls" north and northeast of Beijing. Together, they formed a roughly elliptical web of fortifications  in length and  in diameter. Some of these walls had inner moats (from  in width), beacon towers, battlements, parapets, and outward-facing semicircular platforms protruding from the wallfeatures that set the Jin walls apart from their predecessors.

The Western Xia Great Wall
In the west, the Tanguts took control of the Ordos region, where they established the Western Xia dynasty. Although the Tanguts were not traditionally known for building walls, in 2011 archeologists uncovered  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  at places when they were discovered, and may have been around  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 Western Xia wall in this location may have been incomplete and not ready for use.

The onset of the Mongols

In the 13th century, the Mongol leader Genghis Khan, once a vassal of the Jurchens, rose up against the Jin dynasty. 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 walls; an effective example of this tactic is in 1211, when they circumvented the substantial fortress in Zhangjiakou and inflicted a terrible defeat upon the Jin armies at the Battle of Yehuling. 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 Kublai Khan, became the first non-Han 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. Kublai 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, Kublai 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 Kublai Khan, he did not mention a Great Wall.

Ming dynasty (1368–1644)

The early walls

In 1368, the Hongwu Emperor (r.136898) 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.

During his early reign, Hongwu 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 to 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.  In 1421, the Ming capital was relocated from Nanjing in the south to Beijing in the north, partly to better manage the Mongol situation. Thus defenses were concentrated around Beijing, where stone and earth began to replace rammed earth in strategic passes. A wall was erected by the Ming in Liaodong to protect Han settlers from a possible threat from the Jurched-Mongol Oriyanghan around 1442. In 146768, expansion of the wall provided further protection for the region from against attacks by the Jianzhou Jurchens in the northeast.

Meanwhile, the outer defenses were gradually moved inward, thereby sacrificing a vital foothold in the steppe transitional zone. Despite the withdrawal from the steppe, the Ming military remained in a strong position against the nomads 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 caused the Ming to be on the defensive ever after.

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. After decades of deliberation between an offensive strategy and an accommodative policy, the decision to build the first major Ming walls in the Ordos was agreed upon as an acceptable compromise the 1470s.

Yu Zijun (余子俊; 14291489) first proposed constructing a wall in the Ordos region in August 1471, but not until 20December 1472 did the court and emperor approve the plan. 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 ) 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 (14541530) 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 ). 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, which were two major garrisons guarding the corridor to Beijing where no walls had been built. The two defence lines of Xuanfu and Datong (abbreviated as "Xuan–Da") 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.

From 1544 to 1549, Weng Wanda (翁萬達; 14981552) embarked on a defensive building program on a scale unprecedented in Chinese history. 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. At its height, the Xuan–Da portion of the Great Wall totalled about  of wall, with some sections being doubled-up with two lines of wall, some tripled or even quadrupled. The outer frontier was now protected by a wall called the "outer border" (外邊, wàibiān) that extended  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 , 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 .

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 Hexi Corridor to Wuwei, where the low earthen 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.

From Beijing to Shanhai Pass
In 1550, having once more been refused a request for trade, the Tümed Mongols under 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. According to one contemporary source, the raid took more than 60,000 lives and an additional 40,000 people became prisoners. 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 Jizhou–Changping area (abbreviated as "Ji–Chang") 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.

In 1567 Qi Jiguang and Tan Lun, successful generals who fended off the coastal pirates, were reassigned to manage the Ji–Chang Defense Commands and step up the defences of the capital region. Under their ambitious and energetic management, 1200 brick watchtowers were built along the Great Wall from 1569 to 1571. These included 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; 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 plunder outweighed those of trade, prompting the Ming to close all gaps along the frontier around Beijing. Areas of difficult terrain once considered impassable 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.

Wall construction continued until the demise of the Ming dynasty in 1644. In the decades that led to the fall of the Ming dynasty, the Ming court and the Great Wall itself had to deal with simultaneous internal rebellions and the Manchu invasions. In addition to their conquest of Liaodong, the Manchus had raided across the Great Wall for the first time in 1629, and again in 1634, 1638, and 1642. Meanwhile, the rebels led by warlord Li Zicheng had been gathering strength. In the early months of 1644, Li Zicheng declared himself the founder of the Shun and marched towards the Ming capital from Shaanxi. His route roughly followed the line of the Great Wall, in order to neutralize its heavily fortified garrisons. The crucial defences of Datong, Xuanfu, and Juyong Pass all surrendered without a fight, and the Chongzhen Emperor hanged himself on 25 April as the Shun army entered Beijing. At this point, the largest remaining Ming fighting force in North China was in Shanhai Pass, where the Great Wall meets the Bohai Sea. Its defender Wu Sangui, wedged between the Shun army within and the Manchus without, decided to surrender to the Manchus and opened the gates for them. The Manchus, having thus entered through the Great Wall, defeated Li Zicheng at the Battle of Shanhai Pass and seized Beijing on June5. They eventually defeated both the rebel-founded Shun dynasty and the remaining Ming resistance, establishing their rule over all of China as the Qing dynasty.

Opinions about the Wall's role in the Ming dynasty's downfall are 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 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

The existence of a colossal wall in Asia had circulated 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 (12481318) and Ibn Battuta (13041377), would erroneously identify the Great Wall in China with the walls of the Alexander romances.
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. 152070) 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 (15501620) reported a wall five hundred leagues long, but suggested that only one hundred leagues were man-made, with the rest natural rock formations. The Jesuit priest Matteo Ricci (15521610) 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 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 (160280), 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 (16941774), 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 Macartney Embassy of 1793 passed through the Great Wall at Gubeikou on the way to see the Qianlong Emperor in Chengde, who was there for the annual imperial hunt. 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 Opium Wars of the mid-19th century 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. For 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 Sino-Japanese conflict (193145) 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 troops 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 "The March of the Volunteers", whose words came from a stanza in Tian Han's 1934 poem entitled "The Great Wall". The song, originally from the anti-Japanese movie Children of Troubled Times, enjoyed continued popularity in China and was selected as the provisional national anthem of the People's Republic of China (PRC) at its establishment in 1949.

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 (196676), hundreds of kilometres of the Great Wallalready damaged in the wars of the last century and eroded by wind and rainwere 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" in the words of the National Geographic News. 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, 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 in 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 (220589) had been overlaid by the extant Ming Great Wall.

Western scholarship of the Great Wall was, until recently, 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 had not mentioned the presumably perennial "Great Wall" in his Travels. Some 17th-century scholars reasoned that the Wall must have been built in the Ming dynasty, after Marco Polo's departure. This view was soon replaced 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 took the Wall to 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 this dearth when he was compiling the section on walls for his Science and Civilisation 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 that the Great Wall fits into neither the study of political institutions (favoured by Chinese historians) nor the excavation of tombs (favoured by Chinese archeologists). Some of 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.

See also
History of China
History of Central Asia
Military history of China before 1912
Foreign relations of Imperial China
Lady Meng Jiang, a Chinese folk tale about the Great Wall
Battle of Shanhaiguan (1900), British forces occupy and damage parts of Shanhai Pass during the Boxer Rebellion
The Great Wall of China, a short story by Franz Kafka
Great Wall of China hoax, published in 1899 and expanded in 1939

References

Bibliography

.
  

.

. In two volumes.

 

Great Wall of China
Chinese architectural history
Military history of China
Great Wall of China