Roman legend has it that mortals could access the underworld at certain points on Earth. Located across the Mediterranean, these so-called "gates of hell" were marked by stone passageways built over geologic features like roiling hot springs or the gaping maws of caves. In displays of supernatural power, the ancient Roman priests would lead an animal, usually a healthy bull, through the passageways—an act that swiftly killed the creatures, but left the eunuchs unharmed.

Now, as Colin Barras writes for Science, researchers say they’ve discovered how these gates work. The study, published last week in Archaeological and Anthropological Sciences, focuses on a site in the ancient city of Hierapolis, in modern-day Turkey, and suggests a simple geologic explanation to the puzzling phenomenon.

Built in a highly geologically active area, Hierapolis' gate is positioned on top of a deep fault in the Earth. These fissures emit a steady stream of volcanic carbon dioxide. Though the gas is harmless in limited quantities, billowing clouds of CO2 can swiftly suffocate any creatures that pass through.

The Hierapolis gate is still deadly to this day. As the researchers write in the study, on their first day of work at the site they found two dead birds and more than 7o dead beetles. Locals also report finding dead mice, cats, weasles and even foxes at the site. So how did the ancient priests survive their brush with the gate?

To figure out the puzzle, the researchers measured the CO2 concentration in the arena at various heights overtime, discovering that the concentrations of gas differ during day and night. With the sun shining overhead, the clouds of CO2 dissipate. But at night, the gas collects, forming a thick layer across the arena floor. The concentrations grow high enough overnight that they could kill a person within a minute, according to the study.

Since the clouds of CO2 streaming up from the fissure are denser than air, it collects at ground level. This means that sacrificed bulls or rams, whose heads were too short to reach above the deadly layer of gas, would swiftly die. But the priests were likely tall enough to avoid death, Barras writes, perhaps even standing on top of stones to boost their height. “They … knew that the deadly breath of [the mythical hellhound] Kerberos only reached a certain maximum height,” Hardy Pfanz, volcano biologist of the University of Duisburg-Essen in Germany and author of the study, tells Barras of Science. Pfanz also believes eunuch priests only made their sacrifices in the morning or evening hours, when the concentration of the gas was deadly enough.

The latest study supports the accounts of ancient historians. It's likely these accounts were described "very exactly without much exaggeration," the researchers write.

These are only two of a handful of sites around the world believed to have a gate of hell in the past. Atlas Obscura's list of spots from which to enter the underworld include the Cape Matapan Caves, located on the southernmost tip of Greece's mainland; Hellam Township, Pennsylvania; and the Tapir Mountain Nature Reserve in Belize. Many, but not all of these, were used for the same sacrificial rituals as the Romans used Hierapolis' gate—and they don't all necessarily kill with CO2.

At least for Hierapolis and other documented sites on geological hot spots, however, a bit of simple science can explain the gateway's deadly powers.