Take a look at any fiction that has ancient ruins in it, and odds are that it’s going to be trapped. Whether it’s Indiana Jones swinging over a spiked pit while running from a boulder or Lara Croft leaping off a collapsing floor, if you take fiction as your guide you would expect every ancient temple to have at least a dozen lethal tricks hidden in it. But is any of it real? Did people build traps, elaborate or otherwise, into their tombs, temples, or to protect their treasures? And could any of them survive to the present day?

The answer, it turns out, is yes.

We’ll start our search in Ancient Egypt. There are curses the world over, but none is more famous than the mummy’s curse, inscribed on doorways and statues warning would-be graverobbers of death by snakes, scorpions, and crocodile. But the Pharaohs didn’t rely on supernatural protection alone: they also arranged for more mechanical means of defense. The tomb of Amenhotep III appeared to end in a relatively nicely adorned room with some moderate amount of treasure that was worth stealing. In reality, the false wall on the back hid a passage leading to the rest of the tomb. But before any treasure seekers could even get to the false wall, they had to deal with a much more dangerous trap: a false floor concealing a deadly pit trap! A 6 meter (20 foot) drop down a featureless shaft was basically a death sentence for anyone unlucky enough to get fall in, unless they had some good friends getting them out. People living nearby were paid in perpetuity to replace the false floors as they were activated.

In a similarly hot, pyramid filled environment, but much wetter and 2500 years later, one of my favorite trapped buildings of all time was being constructed: the mighty Baphuon in the Khmer Empire’s capital of Angkor, in what is now modern day Cambodia. One of the greatest tropes in all of fiction is the temple that, when desecrated, dramatically collapses. No collapsing temple from real life exemplifies this trope more than the enormous Baphuon, 34m (111) tall in its ruined state, 50m tall in its glory. Originally dedicated to Shiva when it was built in the 11th century, the 16m bronze and stone altar at the top was disassembled and turned into a statue of the reclining Buddha, on the west side of the second story. But the stones removed were not as ornamental as they seemed: they held back a massive wall of sand, which flooded out, destroying the reclining Buddha and the entire western side of the pyramid. It wasn’t until 400 years later in 1960 when it was reassembled, and it wasn’t opened to the public until 2011. It’s got the reclining Buddha statue, only now the entire thing is reinforced with metal throughout.

In another jungle pyramid, but half a millenia earlier, one of the most dramatic traps of all time was being set in the tomb of the Red Queen of Palenque. Red, being the color of blood, was of paramount importance to the sanguine Maya – it colored nearly all of their buildings, much of their clothing, and in the case of the Red Queen and Lord Pacal, their bones. These two Maya nobles were entombed in the base of two separate pyramidal temples. The stairway from the altar to their death chamber was filled in with rocks and then sealed with another false floor, and when discovered it took years to unearth. But that wasn’t the trap: the trap was what was waiting inside their sarcophagi. Their bones had been painted red with cinnabar – a deadly neurotoxin. The deadly paint covered not just their bones, which it had seeped into, but also all of the jade, pearls, and other treasures in there with her. Arnoldo Cruz and his team of archaeologists had to be top notch to avoid poisoning themselves when they opened the sarcophagus and saw it for the first time, with no warning.

A type of trap used commonly throughout the world is the the classic falling rock trap. It reached its formidable apex in the treasure caches left behind by Spaniards in the rugged California terrain. They could range from as simple as a boulder propped up precariously to complex wooden mechanisms moving boulders about, but their mechanism remains the same: a false wall of some sort protects the treasure from the would-be treasure hunter, and if they don’t bypass it just right, they’ll move something load-bearing and be crushed by falling rocks, which will also seal off the treasure. Some of the treasure caches were even marked in a secret code, intended only to be read by the cache placer or their descendants, which details how to pass through safely.

Perhaps the most storied supposed cache of treasure in North America is the Oak Island Money Pit, a long vertical shaft dug in the wet island soil. Rumors have been flying about the content of it for 150 years, ranging from pirate treasure to Marie Antoinette’s jewels to lost Shakespeare manuscripts and more, and while no actual treasure has been found, layer upon layer of flood-inducing booby traps, seemingly man made, along with what appear to be coded messages, has given generation after generation of treasure seekers hope.

But by far the greatest trapped tomb has got to be that of Qin Shi Huang. Fitting, given that he was the first to unify all of China (“Qin” is where we get “China”): it’s hard to imagine a more important historical figure, nor one more able to command incredible resources to construct what is possibly the world’s most magnificent, and certainly its most well guarded, tomb.

To give a sense of scale, the enormous, majestically carved Terracotta Army, with over 8,000 soldiers, is taken from merely one section of the necropolis surrounding his mausoleum. The mausoleum itself has not been excavated, primarily for fear of the traps. The first one, the one that was most intended specifically as a deterrent for thieves, is actual, for real, automatic crossbows. Of course, archaeologists say that the wood and sinew of crossbows would have long since deteriorated, but some suggest they may have been made from flexible metal, and that if they’re only pulled into position when they’re triggered, the mechanism just might have survived.

And we haven’t even gotten to the best part. The Qin Emperor was said to have been buried with a two square kilometer map of China, complete with liquid mercury lakes and rivers. Despite the tomb not having been opened yet (largely for fear of this trap!) archaeologists are confident that this rumor is true, because soil samples from near the tomb are full of massive amounts of mercury, and the concentration only grows stronger as you approach his grave.

So there you have it: the answer to the question “did ancient people really put traps in their tombs and temples to protect their treasure?” is a resounding yes. If you should encounter any on any of your adventures, tell me about them in the comments!