SHIMLA, India — The people of Shimla haven’t agreed on much lately. A drought in the Himalayan resort has had residents blaming farmers, the tourism industry and one another for depleting the strained water supplies.

And everyone’s been angry at the key men.

Shimla’s decrepit network of water pipes, built under British colonial rule more than 70 years ago, depends on the civil servants known as key men to open and close the valves that supply each neighborhood. The current shortage, which in May left some homes without water for 20 days, has led to such fury toward the key men — accused, in just about every neighborhood, of depriving it of its fair share — that a court ordered police protection for them.

“I was getting angry phone calls calling me everything — stupid, worthless — at one or two in the morning,” said Inder Singh, 44, who has been a key man for 24 years. “I would be mobbed by dozens as I was trying to leave my home for work,” he said, inserting his key — a meter-long metal contraption — into the ground to open a valve.