When the British sought to expand their hold on Hong Kong in 1898, with a 99-year lease covering the whole of Kowloon Peninsula and all the nearby islands, most of Kowloon City was subsumed under the new jurisdiction. Under the terms of the lease, however, it was agreed that the small, walled magistrates' fort to the north of the town would remain Chinese territory until the new colonial administration had been properly established and all the details of land ownership, held within the fort, had been transferred.
The situation was never resolved, and for the next 90 years of British rule the City remained an anomaly: within British domain, yet outside British control. The Chinese officials left for good in 1899, but whenever the colonial authorities tried to impose their will, the remaining residents threatened to turn the attempt into a diplomatic incident...
And so, the Walled City became that rarest of things, a working model of an anarchist society. Inevitably, it bred all the vices. Crime flourished and the Triads made the place their stronghold, operating brothels and opium 'divans' and gambling dens. Undoubtedly, these few (and it always was a small proportion) kept the majority of residents in a state of fear and subjection, which is why for many years outsiders trying to penetrate were given the coldest of shoulders.