The Kowloon Walled City dates back to the Sung dynasty of 960-1297 when it was used as a trading post for salt and as a small fort to house the imperial soldiers who controlled the salt trade.
The wall itself was built in 1898 - the year a territorial dispute raged over the city between the British and Chinese governments. The dispute arose from a loophole in the Convention of Peking, a treaty which ceded the New Territories to Britain for 99 years.
Both sides claimed sovereignty over the Walled City and the area was classified a 'no-man's-land'.
It became a lawless enclave and hotbed of criminal activity. It was packed with opium dens, heroin stands, brothels and dog-meat restaurants, particularly during the 1950s and 1960s, with police usually turning a blind eye to illegal activities.
During the Japanese occupation in World War II, the oldest standing part of the Walled City was demolished to use as building material to extend Kai Tak airport.
Chinese refugees flocked to the site during the civil war on the mainland. Rents were low and there were no taxes, visas or licences inside the city.