India as charted in the 19th and 20th centuries. Left: 1855 (American); Right: 1920 (British). Joseph Colton; Edward Stanford Ltd./Public Domain

For more than a century, the British were able to boast that the sun never set on their enormous empire.

But in the mid-19th century, colonists ruling over the Indian subcontinent became painfully aware they had little idea what their portion of the empire actually entailed, from the number of people to the number of rivers. More pressingly, they knew even less of what lay beyond their border—beyond the Himalayas.

They likely never would have discovered the secrets of South Asia, if not for the help of Nain Singh.

Singh took detailed records of his trips, taken on foot through forbidden lands, often under cover of darkness. At the end of each years-long adventure, he returned his hard-won intel to his employer, the British Crown. He was among the most legendary of the “pundits,” a British corruption of the Hindi word “pandit” for learned person, and the term the British used for their cartographer-spies. Tasked with measuring the terrain, as well as describing its resources, notable features and the best way to cross it, he also analyzed its people, trade and military.

Legendary pundit and cartographer Nain Singh. Unknown/Public Domain

At that time, the British were banned from many countries in south and central Asia. Neighbors like Tibet had banned all foreigners in 1850 to protect themselves as Britain and Russia clashed over their competing desire to control the region. Still desiring to map Tibet, Afghanistan, and other regional powers, the British turned to their Indian subjects, who could convincingly play the part of a local trader or devout Buddhist.

Armed with the few tools that wouldn’t undo their disguise—namely a 100-bead rosary for counting steps and a prayer wheel for storing secret messages—the pundits made best use of what they had. “[The British] tried to make [the pundits] as inconspicuous as possible,” says South Asia historian Ian Barrow, “by suggesting they were just pilgrims walking naturally across the road.”

Tibetan prayer wheel, which were used to disguise and store secret messages in countries beyond Britain’s reach. Dennis Jarvis/CC BY-SA 2.0

What they lacked in technology, they made up in ingenuity. For every 100 steps that Singh took, he moved one bead on his rosary, called a mala. Every 2,000 steps added up to one mile, so every mala marked five miles. Thousands of repetitions added up to the width of the Himalayas and the distance between home and foreign kingdoms not seen by British eyes.

Though the mala and the wheel were both devices for espionage, they advanced Singh’s cover story that he was a humble Buddhist, not a Hindu spy. Had he ever been truly interrogated, however, the rosary would quickly have been revealed a fake (real malas actually have 108 beads) and the wheel an elaborate hidey-hole, full of notes written in code.

These men were asked to risk their lives because “the British always needed information,” says geographer Matthew Edney. From their earliest days on the subcontinent in the 1600s through to their departure in 1947, they felt constantly behind and desirous of every detail that might make them stronger rulers.

Every new battle and every ensuing treaty expanded the colonists’ reach, but a true understanding of the topography—as well as the people, cultures and economies that existed on their new territory—remained elusive. Over time (and three different, competing surveys of India), the colonial government slowly developed a sufficient understanding of its own land. Instead of resting easy, this simply allowed them to develop a new obsession, this time with what hid behind their mountainous northern border.

In the mid-1800s, when the pundit program kicked into high gear, the British were particularly troubled by their neighbors in Afghanistan, Nepal and Chinese-held Tibet, all countries English men, women and children were denied access to. “British official maps at this time show Tibet as one huge white blank,” wrote the late historian Peter Hopkirk, “as though the whole area was obliterated by snow.”

These bans on English entry were particularly stringent on British travelers bearing geographical survey tools, which at the time could be as large as grandfather clocks. That’s because “there’s no good reason for mapping [another] person’s territory,” Barrow says. Recording every peak and valley in a foreign land almost always means you’re preparing for an invasion. That’s why the British were driven to enlist locals who better blended in, train them to use inconspicuous mapping tools and disguise them as monks and wise men.

In this vein, Singh walked across the Himalayas, secretly tracking each step on his rosary. At the end of the long, cold road, he finally gained entry into Tibet’s mysterious capital Lhasa. This made him among the first British loyalists to record the fine details of the geography and culture of the region in years and to send his secrets back to headquarters.

Early photograph (c. 1930) of high officials in Tibet, a region rarely seen and uncharted by western cartographers prior to the pundit program. Ernest Schäfer/Public Domain

But Singh was just one of dozens of Indians tasked by the colonists with such harrowing and strategically important reconnaissance. His colleague Kinthup used the same covert methods in the 1880s to attempt to trace the headwaters of the Tsangpo River, which had long been disputed. On his return from China in 1878, another Singh—Nain’s cousin, Kishen—counted his horse’s steps to track the mileage when he could not walk himself. Together, the pundits mapped tens of thousands of miles of politically and climatically inhospitable earth by foot.

The data they collected for their maps wasn’t as accurate as British surveyors using their best and newest tools would have been. But “without them, there would have been no surveys,” Edney says of every Indian who aided British cartographers over centuries of colonial rule. “They’re absolutely responsible.”

In addition to providing important information, such as the political climate in Tibet and the best path through the Himalayas, the international intrigue shrouding their efforts in secrecy enlivened the stuffy colonial government. It also furthered the Brits’ belief in their own enlightened rule. “I think that’s why it kept going and why their reports were published,” Barrow says. “[T]hey were supposed to be private—but it was great propaganda.”

So great, in fact, it’s inspired numerous successive works of literature and historical review over the ensuing century.

Perhaps most notable is the inspiration it lent to the infamous imperialist author Rudyard Kipling. In 1901, he published the novel Kim based on the stories of the pundits. Charting adventures across India, the Himalayas and Tibet, the book captures the industrious—and often racist—spirit of the era, while summing up colonial thinking on cartography quite well: “There is,” Kipling wrote, “no sin as great as ignorance.”