Most of Hong Kong’s (non-human) primates live in Kam Shan Country Park in the New Territories, on what’s colloquially known as “Monkey Hill.” It’s home to about 2,000 macaques of a couple different varieties. But while monkeys were once indigenous to the city, the macaques of Monkey Hill have a different genesis.

See, in the 1900s, the city was running out of fresh water. And so the city’s administration embarked upon the construction of the Kowloon Reservoir, the New Territories’ first. It would hold 353 million gallons of fresh water—more than enough for the new city’s growing population.

But just as it was nearing competition, the reservoir builders had an unwelcome surprise when they came across strychnos plants growing around the water. The roots, stems, leaves and fruit of the strychnos plants contain several alkaloids which are pretty bad news. One is strychnine—which as any Agatha Christie fan will know, is a potent rat poison beloved of early 20th-century poisoners the world over. It also contains curare, used by the tribes of South America to tip their poison darts. If too many strychnos fruit fell into the reservoir, the city could wave farewell to its fresh water.

And so someone came up with a holistic solution: Release around the reservoir a group of rhesus macaques, who far from being poisoned, would actually feed on the strychnos plants as part of their diets. It worked: the monkeys ate the plants, and the reservoir stayed unpoisoned.

Monkey Hill’s population was boosted further in the 60s by the release of several long-tailed macaques into the area, apocryphally by a troupe of Chinese acrobats who had been denied permission to travel with their animals. The two kinds of macaques interbred, producing a third hybrid species.

Whatever the story, animal numbers grew and the area became well known for its monkey population, drawing tourists with food, which the monkeys soon learned to snatch from our hands. With plentiful food and not much else to do, the monkeys did what monkeys do—and soon the area’s population grew unmanageable as the monkeys became increasingly aggressive in their pursuit of human amenities.

In 1999 the government stepped in and outlawed feeding of the monkeys in the Kam Shan area, also embarking on the world’s first wild monkey neutering program, which brought the population down to a more manageable 2,000.

These days we may see the city’s monkeys as aggressive nuisances to be neutered and released—but it’s worth remembering that not so long ago, they saved our lives.