In 1985, Jorge Eckstein stumbled onto what would become one of the most important archaeological sites in Buenos Aires: a portal to a subterranean labyrinth.

In 1985, Jorge Eckstein, long-time resident of Buenos Aires’ historical San Telmo neighbourhood, purchased an abandoned mansion near his home that he intended to transform into a restaurant.

Built in 1830, the mansion was grand but dilapidated. It was what many Argentines refer to as a ‘casa chorizo’ – so named because the rooms of the house are lined up in a row like a string of sausages, opening onto a series of side patios. Eckstein knew the house would need a lot of work; the walls were crumbling and the ground floor was covered in debris.

Not long after Eckstein began to renovate, he noticed something unusual about the foundation of the house, and it wasn’t long before one of the patios was sinking. It turned out that Eckstein had stumbled onto what would become one of the city’s most important archaeological sites: a portal to an underground labyrinth.

You may also be interested in:
• An ancient world concealed underground
• Chicago’s underground city that’s becoming a design star
• The cakes beloved by anarchists

The idea of a mysterious underground world has long been a subject of interest and imagination in Buenos Aires. “The old myths about the existence of a great swarm of tunnels under the city come back to life again and again,” said Ricardo Orsini, coordinator at the city’s Interpretive Centre for Archaeology and Palaeontology.

After Eckstein discovered the sinking patio, a team of archaeologists from the University of Buenos Aires investigated the building’s foundation to learn more about its history. The 20-room mansion had been abandoned in the late 1800s when its occupants fled from the deathly waves of yellow fever sweeping through the Argentine city. In the early 20th Century, the mansion served as tenement housing, but by the 1980s, it was abandoned once again.

The decision to dig marked a dramatic change in our local concept of recovering the past

"The decision to dig under the whole building marked a dramatic change in our local concept of recovering the past," Eckstein said, "because it revealed not only the past that appears on the surface, but the past that existed under all the buildings."

Under the house, the archaeological team discovered an unusual vaulted construction, which further excavations revealed as the roof of an underground tunnel. But a tunnel leading to where? And for what purpose? These were the questions the archaeologists explored as they uncovered almost 2km of subterranean passageways. Their research revealed that the old house sat on top of an intricate drainage system. It seemed that neighbourhood residents built the tunnels around 1780 to reroute a stream that caused flooding when it rained, bringing a flow of dirty water – including animal waste from farms on the outskirts of town – onto the city streets.

Today, the mansion – now the El Zanjón de Granados museum – acts as the entryway to the refurbished tunnels while also housing exhibitions that showcase objects found during the excavation. Standing inside one of the tunnels, I wouldn’t have guessed that these broad passageways were used for such a practical purpose. They’re eerily romantic; lined with exposed brick, they’ve been beautifully restored and illuminated.

While the discovery of the tunnels was a surprise to Eckstein, it wasn’t news for some of San Telmo’s older residents. Several of his neighbours remembered when segments of the dried-out tunnels were still open; no-one seems to know when and why they were closed off.

Until relatively recently, confirms Daniel Schávelzon – who led the excavation at El Zanjón de Granados and is now the founder and director of the city’s Centre for Urban Archaeology – any knowledge about the city’s underground passages was based on memory and word of mouth.

“Since I was a student, I was interested in the underground world,” Schávelzon told me. “But everything I heard or read didn’t make sense. It was all myth and fantasy. Nobody was doing serious work. Later, when I was working in the field of urban archaeology, I myself became seriously involved in the subject. And I found underground constructions of all kinds. It’s fascinating.”

Founded in 1536, San Telmo is the oldest part of the original settlement of Buenos Aires, and it’s here that many of the city’s underground tunnels are concentrated. But not all the tunnels were built for plumbing purposes. More than a century before the residents of San Telmo rerouted a stream, Jesuit priests were busy at work on another set of tunnels.

In the late 16th Century, a Jesuit order from Spain settled in Buenos Aires with the intention of spreading Christianity to the New World. They established a mission consisting of a church, a museum, a library and even a pharmacy – a complex known today as the Manzana de las Luces (Block of Enlightenment).

But the Jesuits weren’t exactly welcome in their new home – the region’s indigenous populations strongly resisted the priests’ attempts to convert them to Christianity. As conflict brewed, the Jesuits took steps to ensure their safety.

It was meant to be a secret

According to Schávelzon’s research, the tunnels beneath the Manzana de las Luces were likely one part of a much larger (and unfinished) plan to connect the city’s churches to allow priests and their congregations to escape in the event of an attack. “It was a defensive project,” Schávelzon explained, “similar to what we’ve seen in Lima [Peru] and in other cities in which there’s no fort, no walls or cliffs. In case of an attack, the only way out is an underground escape.”

Even the experts don’t know the extent of the Jesuits’ network. In 1767, after failing to convert the indigenous population, the Jesuits abandoned their mission in Buenos Aires, heading inland to establish other missions near the border of Paraguay. The Spanish colonists who remained repurposed the mission buildings for their own use, establishing the Royal College of San Carlos and Argentina’s first national library in their place (both establishments are no longer here). And the Jesuits didn’t leave behind blueprints. “There is very little written documentation,” Schávelzon told me. “It was meant to be a secret.”

The Jesuit tunnels remained hidden for nearly 150 years, until 1912, when, amid renovations for an architectural school that was operating inside the Manzana de las Luces complex, the floor started collapsing beneath workers’ feet.

A small section of the tunnel is accessible to the public on a guided tour. In comparison to the spacious tunnels beneath El Zanjón de Granados, the narrow, stone Jesuit tunnels feel rudimentary. Visitors walk single file through the dimly lit passageway, stooping to avoid bumping their heads on the low-arching ceilings.

The losses we’ve suffered are irreversible

While some experts believe the passageways beneath El Zanjón de Granados and Manzana de las Luces were once a part of a more extensive tunnel system, the theory is hard to prove. If a larger network existed, much of it has been lost to time. In recent decades, construction crews working on unrelated projects, like the expansion of the subway, have uncovered, and bulldozed through, subterranean structures that could have been part of that larger network.

“Unfortunately,” Orsini said, “archaeology did not always arrive in time to study all these architectural structures built underground. This is a metropolis in permanent development, and for a long time we lacked a legal framework to protect and preserve our archaeological heritage.” A remedial law passed in 2003 helped, “but the losses we’ve suffered are irreversible,” he said.

The mysteries surrounding the tunnels continue to fascinate the public, and stories of undiscovered tunnels still pop up in the news from time to time: in 2000, long-time professors at Fernando Fader Technical School, located in the Flores neighbourhood 9km west of the Manzana de las Luces, recalled an old tunnel that once connected the building’s basement to the nearby Flores train station. An archaeological team found an underground chamber, but no tunnel. Yet to this day, the professors insist that it existed.

Archaeology is the study of human history. But human recollection is part of the record, too. When the tunnels beneath El Zanjón de Granados were discovered, an elderly neighbour named Anastasio expressed delight, but not surprise. He said he always knew about the tunnels: he used to play in them as a child.

“Por fin los encontraron!” (“They finally found them!”) he exclaimed.

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.