From a ridge near Beijing, the Great Wall runs along the crest of the mountains, turns, and disappears into the next valley. The brickwork is regular, the watchtowers stand at intervals, and the walkway is wide enough for soldiers to march along it. It looks like a single great work, built at one time for one purpose. That impression is the first thing the history corrects.

The wall is not one wall. It is a network of walls, watchtowers, beacon towers, fortresses, and passes, built, abandoned, rebuilt, and extended over about two thousand years. The sections most people visit are the work of the Ming dynasty, which ruled from 1368 to 1644. Earlier walls were built of rammed earth and have largely disappeared, while the Ming walls were built of brick and stone and have survived.

UNESCO describes the Great Wall as a military defence project built continuously from the third century BC to the seventeenth century AD, on the northern border of China, with a total length of more than 20,000 kilometres. It begins in the east at Shanhaiguan in Hebei province and ends at Jiayuguan in Gansu province in the west. Its main body consists of walls, horse tracks, watchtowers, and shelters, with fortresses and passes along its length.

A national survey in 2012 measured the full network at 21,196.18 kilometres. That figure includes every branch and overlap built across two thousand years, not only the wall a visitor walks on today. The Ming wall alone measures 8,850 kilometres, and it is the part most people actually see.

Walls Before the Wall

The first walls were not built by an emperor of a united China. They were built by separate states during the Spring and Autumn period, from 770 to 476 BC, and the Warring States period, from 475 to 221 BC. Each state built walls along its own frontier, to protect itself from rival states and from nomadic peoples to the north.

The state of Chu began building a permanent defensive system in about the seventh century BC. Other states followed, and the walls marked the boundaries between kingdoms that were at war with each other. The wall was therefore first a line between Chinese states, not only a line between China and the outside world.

That changed in 221 BC, when Qin Shi Huang became the first emperor of a united China. He ordered the fortifications between the previous states to be removed, because they served only as obstacles to internal movement, and he sent the general Meng Tian to link the existing northern walls into a single system. Construction began in about 214 BC and lasted about a decade.

The Qin wall was built mostly of rammed earth, and it does not survive in recognisable form. It ran from the region of the Ordos to Manchuria, and it was meant to defend the new empire against the Xiongnu, the mounted nomads of the steppe. The idea of one wall for one empire begins here, but the wall itself was rebuilt so many times that little of the original remains.

The Wall as a Working Frontier

Later dynasties rebuilt and extended the wall according to their own needs. The Han dynasty, from 202 BC to AD 220, extended the fortifications furthest to the west, and under the emperor Wudi the wall spanned about 6,000 kilometres from Dunhuang in the west to the Bohai Sea in the east. The Han wall was also built of rammed earth, and it served as a frontier for trade as well as defence.

The wall did more than keep out horsemen. It served as a raised road, a customs and border control on Silk Road trade, and a line between settled farming China and the herding peoples of the steppe. Signal towers passed warnings by smoke and fire, and garrisons lived in the fortresses along the route. The wall was a place where people worked, not only a barrier they looked at.

Not every dynasty built walls. The Tang, Song, Yuan, and Qing dynasties mostly did not build frontier walls, preferring campaigning and diplomacy to deal with the threat from the north. The wall therefore has gaps in its history as well as gaps in its line. It was a policy that came and went, not a permanent feature of Chinese rule.

The people who built the wall were soldiers, forced labourers, and local workers, and the work was hard and dangerous. The sources do not give a reliable total for how many died, and the article does not invent one. What is documented is the scale of the organisation: kilns along the route fired bricks stamped with the kiln name and date, and mortar made of lime and sticky rice held the brickwork together.

The Ming Rebuilding

The wall that visitors see today is largely the work of the Ming dynasty. After the Ming army was defeated by the Oirat Mongols at Tumu in the mid-fifteenth century, the Ming abandoned the northern loop of the Yellow River and built a new line along the southern edge of the Ordos Desert. The rebuilding became a systematic project that lasted about a hundred years.

Ming builders replaced rammed earth with brick and stone facing over a rubble core. The wall averages 5 to 8 metres in height, with a base about 6 metres wide narrowing to about 5 metres across the upper walkway. Watchtowers were placed at regular intervals, and between 1567 and 1570, the general Qi Jiguang alone built about 1,200 brick watchtowers between Shanhaiguan and Changping.

The Ming wall runs for 8,850 kilometres, of which 6,259 kilometres is built wall, 359 kilometres is trenches, and 2,232 kilometres is natural barriers such as cliffs and rivers. The best-preserved sections near Beijing, at Badaling, Mutianyu, Jinshanling, and Simatai, were rebuilt in this period. Their brickwork is the reason they have lasted where earlier walls crumbled.

The Ming also built the Nine Garrisons, nine defence areas that organised the frontier into commands with their own troops and supplies. The wall was therefore not only a structure but a military system, with men stationed along it, supplies moved to it, and signals passed along it. The towers that tourists photograph were once working posts with soldiers inside them.

When the Wall Stopped Working

The wall failed at the point that mattered most. In 1644, Qing troops marched through the gates of the Shanhai Pass and replaced the Ming as rulers of China. The wall had not stopped an enemy that came through its own gate, and the new Qing dynasty expanded the border of China northwards, making the wall obsolete as a defence.

After the Ming, the wall fell into decay. Restoration and preservation efforts only seriously began in the 1980s, and the wall was declared a UNESCO World Heritage Site in 1987. UNESCO recognised it under five criteria, including as a masterpiece of military architecture and as a symbol of incomparable significance in the history of China.

Today, the wall is a national symbol, and that symbolism is part of its history. UNESCO says the wall embodies unparalleled significance as the national symbol for safeguarding the security of the country and its people. The wall that was built to keep people out is now the image China shows the world, and the image the world carries home.

The wall endures as a record of two thousand years of decisions about where China ended and what lay beyond it. It was built in earth, rebuilt in brick, abandoned, restored, and finally kept as a monument. The line across the mountains is still there, but the frontier it marked has moved, and the wall now marks a history rather than a border.