These shocking pictures are all of Kowloon Walled City, which was once the most densely populated place on Earth. The cramped quarters in Hong Kong were documented by Greg Girard, a Canadian photographer who works primarily in Asia.

A 1987 survey counted approximately 33,000 people on its 6.5 acres, giving it a population density of 1,255,000 people per square kilometer. From the 1950s to the 1970s the area was controlled by the Triad gang, but the people living there, while poor, formed support networks to help each other deal with the hardships of such cramped living spaces. The enclave’s unique architecture formed due to attempts to maximize available space within the enclave – because of small apartments, upper floors often were made wider than the ones below them, and new extensions were often built haphazardly with poor foundations. It is said that the city could be crossed north to south without ever touching the ground along a network of stairs, ladders and passageways.

Although it was demolished in 1003 and 1994, the city’s memory remains a striking example of modern urban squalor and growing population concentrations in urban areas world-wide. Its likeness (or, while it still stood, its streets) has been used as an inspiration for books and films dealing with crime and urban life. Among them – Jackie Chan’s Crime Story, Jean-Claude van Damme’s Bloodsport, and Christopher Nolan’s Batman Begins.