Information is power. This is the logic — or at least the aspiration — behind the U.S. government’s current approach to intelligence gathering: the more data (or metadata) in hand, the more control. The National Security Agency’s surveillance leviathan, funded by a black budget and presided over by a star-chamber court, suctions up almost inconceivable amounts of material from around the world, including your phone and computer. How did this begin, and where will it end?

History shows us that this is a story about empire. For more than a century, major innovations in U.S. intelligence-collection capacity have accompanied major expansions of U.S. influence on the world stage. In some cases, U.S. government agencies used distant theaters to test approaches they would later deploy on the home front. Elsewhere, they helped foreign police build internal surveillance systems. The trainers then returned to work in domestic law enforcement, employing the same practices locally. Either way, U.S. residents should worry. The information-management strategies the U.S. has used in projecting its power abroad have usually come home to roost.

It was during the United States’ bloody occupation of the Philippines after the Spanish-American War that U.S. policymakers first yoked intelligence collection to imperial expansion and then repatriated it. As the historian Alfred W. McCoy writes in “Policing America’s Empire,” U.S. colonial police, powered by a nascent information revolution and unfettered by constitutional restrictions, built an elaborate covert surveillance apparatus to help quell resistance. Their system maintained individual file cards on an astonishing 70 percent of the local population.

When the U.S. scaled down the occupation during World War I, veterans of the counterinsurgency effort, including the military intelligence pioneer Ralph Van Deman, returned to lead a large-scale ramp-up of domestic surveillance infrastructure, designed to provide the enforcement muscle for new legislation such as the 1917 Espionage Act and the 1918 Sedition Act. Among Van Deman’s achievements: a collaboration between his military intelligence division and the American Protective League, a private network of 300,000 citizen spies that even after the war spent decades targeting German-Americans, repressing labor militancy, spying on civil rights activists and identifying Hollywood communists for blacklisting. (Van Deman also amassed a personal archive of file cards on a quarter-million suspected U.S. subversives.)

As fears about fascism and communism escalated during the 1930s, U.S. attentions turned outward again. Franklin Roosevelt’s administration, eager to access the intelligence collected by foreign police forces, directed the Federal Bureau of Investigation to develop relationships with its counterparts abroad. The FBI helped countries such as Brazil and Colombia set up secret intelligence services from which the U.S. could profit, both by gaining access to foreign surveillance data and by honing strategies that could later be integrated into domestic police practices.

As the Cold War set in and the Central Intelligence Agency and the NSA were established (in 1947 and 1952, respectively), the U.S. not only stepped up its own intelligence collecting capabilities but also trained police forces in Japan, Greece and Uruguay, among others, in anti-communist counterinsurgency methods. Best dramatized by Costa-Gavras in the film “State of Siege,” this proxy training aimed to build on-the-ground surveillance capacity, allowing local allies to share the work of Cold War containment and simultaneously guaranteeing the U.S. government access to the information their allies could now capture.

Take the case of Guatemala. There, soon after the CIA helped orchestrate the 1954 coup that ousted the democratically elected leftist President Jacobo Arbenz, U.S. trainers arrived to help the new military government consolidate power. Their first order of business, as one U.S. adviser reported back, was to help the Guatemalan police optimize its “almost neurotic hypersensitiveness to communist activity” by updating its “hopelessly inadequate” filing system. Simply put, to hunt down enemies of the state — to track their movements, record their political opinions, identify their associates, map their daily routes and, ultimately, eliminate them — you had to keep good files on them.