Ancient work of monumental architecture, Wonder of the World, and protection against—giant lizards? The Great Wall of China is perhaps more powerful as a symbol than a physical structure, but in a new Hollywood blockbuster starring Matt Damon (who weathered some controversy related to whitewashing) the wall is all about fighting off formidable enemies. To celebrate the release of “The Great Wall,” read more about the mammoth structure that inspired the movie.

The wall was built over the course of centuries

Construction of the wall was first initiated by Emperor Qin Shi Huang around 220 BC, who was the first emperor of unified China. For centuries, China had been divided into numerous geopolitical factions. This Warring States Period saw plenty of walls constructed to form boundaries between the different groups. With Qin as emperor, the walls between states were removed and some were repurposed to form a border between China and the “barbarians” to the north. Approximately 300,000 captured soldiers and conscripts were forced to complete Qin’s section of the wall, which were mostly made of rammed earth.

While Qin was remarkable for starting the wall, the most enduring sections were built during the Ming Dynasty (1368-1644), when Beijing was made the new Chinese capital. This chunk of the wall stretched from the Yalu River (on the border with modern-day North Korea) to Gansu Province hundreds of miles to the west. The Ming wall remains the most famous portion of the structure, with its iconic stone towers and gates around Beijing, Tianjin and Hebei.

It isn’t actually one long wall

Built by a series of governments over 2,000 years, the wall isn’t one long, unbroken stretch of fearsome architecture. It is actually a chain of different structures, including fortresses, gates, watchtowers and shelters, and there are large gaps between different sections. The wall’s official length was released in 2012 by China’s State Administration of Cultural Heritage after a five-year study, putting it at 13,170 miles, but experts point out that this includes sections of the wall that no longer exist. Arthur Waldron, a historian and expert on the Great Wall, says the solid wall is more like 1,700 miles long.

The Great Wall wasn’t a great barrier

Although giant lizards were never a concern, like they are for Matt Damon and his cohorts in The Great Wall, Chinese governments were very concerned about Mongol raiders—and with good reason, considering how often they invaded. But it turns out the wall wasn’t very effective way of keeping the invaders out. “While a towering monument to Chinese civilization, it was hardly impregnable,” writes Ishaan Tharoor for the Washington Post. “The Mongols, Manchus and others all breached this great defense and went on to establish their dominion behind its ramparts.” Genghis Khan and Kublai Khan easily broke through the wall in the 13th century, and in September 1550, Mongol raider Altan Khan led tens of thousands of raiders on an attack past the wall, killing thousands of Chinese civilians and plundering the countryside for several weeks before retreating.

Depending on which dynasty was in power, the wall wasn’t even all that necessary. “The Tang, who ruled from 618 to 907AD built virtually no walls, because the imperial family was part Turkic and skilled in Central Asian warfare and diplomacy,” writes Peter Hessler for the New Yorker. During the Ming Dynasty, the wall was one of three strategies for dealing with the Mongols. The other two included taking the offensive and buying off important leaders with gifts or access to trade.

It’s a myth that you can see the Great Wall from the Moon (and it’s only barely visible from space)

In 1923, National Geographic started one of the most enduring myths about the wall: that it’s “the only work of man’s hands which would be visible to the human eye from the moon.” Neil Armstrong, following his return from the moon in 1969, was asked on a number of occasions whether the wall was visible. But due to the wall’s construction materials, which blend into the terrain around it, the Great Wall has only ever been visible from low orbit (100 miles up) – and even then, the sun has to be in the perfect position to illuminate it and cast shadows. Even China’s own astronaut, Yang Liwei, admitted he couldn’t identify the structure with the naked eye.

There’s a secret ingredient that holds the wall together

Scientists at Zhejiang University in China were researching the makeup of mortar used for building the Great Wall when they realized something unusual was added to the standard mixture of lime (limestone that has been heated to a high temperature) and water: sticky rice. The mixture made it the world’s first example of composite mortar, including organic and inorganic material. In their tests, the scientists compared the quality of mortar made with and without sticky rice, and found that “sticky rice-lime mortar has more stable physical properties, has greater mechanical storage, and is more compatible, which make it a suitable restoration mortar for ancient masonry.” Using sticky rice as a construction ingredient was one of the greatest innovations of the Ming dynasty, helping their structures (including tombs and pagodas as well) survive earthquakes and the elements, researchers said.

People have been pillaging chunks of the Great Wall for decades

While it might be a source of national pride today, the Great Wall hasn’t always received so much love. Approximately one-third of the structure is crumbling, 20 percent is in “reasonable” condition, and the last half has disappeared after centuries of neglect. During the deadly Cultural Revolution (a 10-year movement initiated by Mao Zedong that resulted in the killing of 1.5 million Chinese and millions more imprisoned and tortured), Chairman Mao and other officials encouraged the dismantling of the wall for use as bricks to build homes. And while it may be state-protected today, farmers living in rural areas continue to use the bricks to build homes and animal pens.

Smugglers snuck valuable contraband through border checkpoints along the wall

In addition to keeping invaders out, the wall was an ideal checkpoint for letting people in. Nomadic people of the steppe came to the wall to trade horses and leather for manufactured Chinese goods like pottery and clothing. Much like modern TSA agents, Chinese border guards kept records of travelers passing through gates along the wall, checked for contraband, and compared travelers to lists of criminals and smugglers. Among the most famous smugglers were the two legendary monks who hid silkworm eggs in their bamboo staffs, managing to trick the border guards and bring the source of silk to Byzantine emperor Justinian I.

The wall is the longest cemetery on Earth

Construction workers were a disposable commodity when it came to building the wall. It’s estimated that as many as 400,000 people died building the wall, earning it the sobriquet “longest cemetery on Earth.” Many of the workers who died during the wall’s construction were buried in its foundation. Peasants and soldiers forced into labor suffered under terrible conditions, with insufficient food, steep hillsides and brutal weather. The wall had such a reputation for suffering that it was an indispensible reference in Chinese literature, like in the “Soldier’s Ballad” (200 A.D.) and popular novels of the Ming dynasty.

It was one pricey wall

Even without factoring in the loss of life, the wall was a massive undertaking. Between the cost of labor, the food and dwellings needed to house workers, and the raw materials, the Great Wall was extraordinarily expensive. Often the Chinese people bore the brunt of these expenses, since the government levied higher taxes to pay for the wall and its repairs. During the Ming dynasty, repairs on the west end of the wall cost 470 ounces of silver per kilometer, for a total of 487,500 ounces. Repairs to the east also required further financing. Building extensions to the walls themselves were even more costly: in 1576 these fortifications were projected to cost over 3.3 million ounces of silver, which accounted for more than three-quarters of the government’s annual revenue, writes historian Julia Lovell in The Great Wall: China Against the World, 1000 BC - AD 2000.

A graffiti zone for the Great Wall

Decorations etched into the Great Wall go back for centuries, including carvings of clouds and lotus blossoms supposedly created by the wives of soldiers constructing the wall under the direction of General Qi Jiguang of the Ming dynasty. But in modern times, graffiti has become a nuisance rather than an expression of art. In 2016, NBA player Bobby Brown of the Houston Rockets came under fire for carving his name into the Great Wall, but plenty of more anonymous tourists have left their marks as well. The problem has become so widespread, Chinese officials have considered setting up a special graffiti section at one of the fighting towers at the Mutianyu section of the wall (about 40 miles north of Beijing), where visitors will be allowed to carve their immortal words.