COLCHESTER, Vt. — BY leaking details of the National Security Agency’s data-mining program, Edward J. Snowden revealed that the government’s surveillance efforts were far more extensive than previously understood. Many commentators have deemed the government’s activities alarming and unprecedented. The N.S.A.’s program is indeed alarming — but not, from a historical perspective, unprecedented. And history suggests that we should worry less about the surveillance itself and more about when the war in whose name the surveillance is being conducted will end.

In 1862, after President Abraham Lincoln appointed him secretary of war, Edwin M. Stanton penned a letter to the president requesting sweeping powers, which would include total control of the telegraph lines. By rerouting those lines through his office, Stanton would keep tabs on vast amounts of communication, journalistic, governmental and personal. On the back of Stanton’s letter Lincoln scribbled his approval: “The Secretary of War has my authority to exercise his discretion in the matter within mentioned.”

I came across this letter in the 1990s in the Library of Congress while researching Stanton’s wartime efforts to control the press, which included censorship, intimidation and extrajudicial arrests of reporters. On the same day he received control of the telegraphs, Stanton put an assistant secretary in charge of two areas: press relations and the newly formed secret police. Stanton ultimately had dozens of newspapermen arrested on questionable charges. Within Stanton’s first month in office, a reporter for The New York Herald, who had insisted that he be given news ahead of other reporters, was arrested as a spy.

Having the telegraph lines running through Stanton’s office made his department the nexus of war information; Lincoln visited regularly to get the latest on the war. Stanton collected news from generals, telegraph operators and reporters. He had a journalist’s love of breaking the story and an autocrat’s obsession with information control. He used his power over the telegraphs to influence what journalists did or didn’t publish. In 1862, the House Judiciary Committee took up the question of “telegraphic censorship” and called for restraint on the part of the administration’s censors.