(CNN) -- Picture a colossal empire of little houses stacked on top of each other. Visualize them connected by staircases snaking under dangling wires, through corridors so dark even police were rumored to be afraid of them.
Now picture 33,000 people living there, within the space of one city block. That was Kowloon Walled City, once considered the densest settlement on earth.
"A huge monstrosity of buildings"
Before it was demolished twenty years ago, photographer Greg Girard spent years with collaborator Ian Lambot documenting this unique Hong Kong phenomenon, and remembers being amazed when he first saw it.
"It was a huge monstrosity of buildings," recalls Girard. "It didn't look like anything else."
After all, the Walled City was a kind of historical accident. A former Qing dynasty fortress, it never fully came under the regulation of the British colonial government in Hong Kong. As a result, its residents were free to build their dwellings as they wished, ignoring safety codes.
"Quite often houses were built by building onto the next building, punching out walls to use their staircases," said Girard. "A lot of them didn't have access to air or open space, because they were enclosed in the center of the structure."
Deep within the building's darkness, a variety of small businesses flourished.
"The places that stuck out were the meat factories," says Girard. "There were pig carcasses laying splayed out on the floor; they'd burn the hair off with a blowtorch, it was all pretty open and of course there were no health laws governing the place."
But despite the City's wild appearance, the photographer found that the people inside lived just like people anywhere else.
"People were doing very ordinary things," he says. "It's just that all these ordinary things were happening in an extraordinary place."
An ingenious community
The complexity of the Walled City also fascinated local architect Aaron Tan, now the director of Hong Kong firm Research Architecture Design. A graduate student then, he wrote his thesis on the Walled City as it was being torn down.
"I was fascinated -- it was like a piece of machinery that worked very well. The demolition was like taking the machine apart -- the first time you could see what was inside.
"It was a really humbling process for me as a designer -- when we met this Walled City, we started to see that people could be more intelligent than us, the designers -- that they could think of ways to solve problems that are outside the traditional academic world."
Tan was especially impressed by Kowloon Walled City's water system. To support its dense population, residents dug extra wells and built thousands of pipes that twisted through the building. But since pumping water to the City's roof tanks required plenty of power, the people would take turns conserving electricity so that water could be shared successfully.
"It revealed the community inside -- that no matter the challenges, they would find some intelligent way to solve it," says Tan.
Despite the ingenuity of the Walled City, by 1994 it was completely torn down by the city government, which was eager to replace the chaotic and unregulated community with a public park.
"Seeing the Walled City fall into disuse was sort of melancholic," says Girard. "Every city realizes too late to start caring about their architectural heritage -- it's a mistake that gets repeated everywhere. By the time you start caring about it, it's too late to save it."
Today, visitors to the site of the old Walled City will find a placid garden with swaying trees and cloudy ponds. In the park there is a small museum in honor of Kowloon Walled City. But when you look to the sky and imagine the colossus of Hong Kong life that once stood, it's easy to see that something significant has been lost.
The City is not dead
Even today, the City's legacy lives on. A walled neighborhood called the Narrows in the 2005 film "Batman Begins" was based on Kowloon Walled City. The City is even a level in the video game "Call of Duty: Black Ops."
Because of the continued interest, Greg Girard is working with his fellow Kowloon Walled City photographer Ian Lambot to finish a new book of their stunning photographs, entitled "City of Darkness: Revisited." (Click here to visit the book''s crowd-funding campaign).
"You don't want to romanticize a slum, you know. Because it was that. But it was much more than that. The Walled City was a kind of architectural touchstone in terms of what a city can be -- unplanned, self-generated, unregulated. It was vital and vibrant and every part of it was being used."
Tan believes the spirit of the Walled City continues to pulse through the heart of Hong Kong itself.
"Go to The Peak and look down upon this amazing collection of buildings coming together -- it's almost like a blown up version of the Walled City, right? Each building is related to the next building. New programs evolve because of the connections."
This organic chaos, he says, has been an inspiration for his own work.
"Many architects and urban planners like control," he says. "But people like to get lost in the city. In my design process, I always consciously try to allow accidents, to allow others to participate, to surprise me."