Bill Scher is the senior writer at the Campaign for America’s Future, and co-host of the Bloggingheads.tv show “The DMZ” along with the Daily Caller’s Matt Lewis.

Edward Snowden raised some eyebrows when he told NBC News, “people have unfairly demonized the NSA to a point that is too extreme.” The remarks that followed made clear he was only defending the National Security Agency’s working stiffs, not its leadership, mission or past history. But we should take that comment to heart and reflect on what the NSA has accomplished. During pivotal moments in history, America’s clandestine surveillance on its allies played a hidden role in dramatically advancing the cause of peace and freedom over the past half-century of international diplomatic relations.

The most significant and best-chronicled example is from mid-1945, when Secretary of State Edward Stettinius heavily relied on the NSA—technically, its precursor, the U.S. Army’s Signal Security Agency, or SSA—to successfully make various deals with other countries at the San Francisco Conference, which culminated in the drafting and signing of the United Nations Charter.


As detailed by the writer Stephen Schlesinger in his 2004 book Act of Creation: The Founding of the United Nations, Stettinius used the SSA to break the codes of intercepted diplomatic cables and learn the private views of nearly all the attending delegations before and during the April-to-June conference, informing the secretary’s negotiating strategy on a series of conflicts that threatened to derail the process.

The SSA helped Stettinius navigate the controversy over the admission of the once Nazi-friendly government of Argentina. In February, the secretary learned from intercepts that some Latin American countries, interested in smoothing Argentina’s path, were strategizing to pressure the Buenos Aires government to trade a declaration war on Germany and Japan for the intermediary step of American diplomatic recognition. The SSA separately captured private communication between Argentine officials entertaining such a compromise. Stettinius used the information to strike a deal along those lines in late March.

Then, days before the conference opened in April, the SSA intercepted correspondence between Colombian diplomats signaling plans to warn the Soviet Union of damaged relations with Latin America if it thwarted Argentina’s bid. The “Magic Diplomatic Summary,” which was the SSA’s preferred method of synthesizing and analyzing decoded cables for Stettinius, conveyed that Ecuador was organizing Cuba, Mexico, Panama, Peru and Venezuela to, in Schlesinger’s words, “do hand-to-hand combat with the Soviets” over Argentina. Surmising that the Latin American countries might sink the conference by walking out, Stettinius decided to risk the ire of the Soviet delegation and force a vote in the conference’s first week, securing Argentina’s admission.

Stettinius also learned from intercepts about deep resistance from European colonial powers, especially France, to relinquishing their territory. The SSA also clued him in on when that resistance began to soften. At the February Yalta conference, the SSA found French diplomats expressing their concerns to the Soviet Union and finding common ground with the British foreign minister. Shortly thereafter, the SSA intercepted a message from France’s foreign minister describing successful talks between the leader of France’s provisional government and the Dutch foreign minister, joining forces against “surrendering to an international authority any of their colonies.” In April, before San Francisco, the SSA again broke the code of France’s top diplomat as he informed his envoys that France would oppose U.N. seizure “over all or part of her colonial empire.”

Heading into the conference, this information persuaded Stettinius to soften his stance on decolonization and pursue a compromise. During the conference, however, the SSA picked up that a French official had wired Paris to say the delegation should “not turn down a text in which independence is set as the eventual goal” because it would not have many backers. A final compromise was reached regarding the U.N.’s Trusteeship Council, which established procedures for managing territory conquered in World War II, mandates previously created by the outgoing League of Nations and other colonies. The crux of the deal was that the word “independence” would be used to convey the principles of the council, but only the softer “self-government” would be used in the section regarding dependent peoples in colonies.

The surveillance also tipped off Stettinius that the approximately 40 smaller countries slated to attend the conference were chafing at the proposal to give broad veto power to the five permanent members of the planned Security Council. The SSA had intercepted a March message from the Chilean foreign minister asking his diplomats to find out if other countries shared his concerns, and uncovered that he had received affirmative replies from Costa Rica, Cuba, Italy, Switzerland and the Vatican. Turkey expressed similar reservations in a separate message to France, which began plotting to restrain the veto. The French diplomatic cables prompted Stettinius to lean on France to reverse its position and defuse the growing revolt.

France, according to Schlesinger in a separate essay, initially rebuffed the offer to be one of the Big Five out of pique after being excluded from the Yalta conference, and instead “held to a romantic notion of becoming the leader of the UN’s smaller nations.” But Stettinius’ newly aggressive “flattering [of] France’s pretensions to being a great power” prompted France to flip and accept membership to the Security Council, undercutting the anti-veto forces.

***

If you accept the rap on the United Nations as a worthless debating society, then the above history won’t instantly impress you. But the reality is that the U.N.’s establishment literally made the globe less bloody and freer. In the first half of the 20th century, before the U.N.’s founding, the world suffered more than 90 million casualties from two world wars. Since the U.N. was created, we’ve had no world wars, and the wars we have had have been far less deadly.

The Human Security Report Project, a research center affiliated with Simon Fraser University in Canadathat tracks and analyzes trends in global violence, credits the U.N.in large part for the dramatic reduction in war-related deaths, from 240 per million in 1950 to less than 10 in 2007. The 2013 edition of the report observes that “popular revulsion generated by the mass slaughters of World War II … strengthened the emergent norm that proscribed the resort to war except in self-defence or with the imprimatur of the UN.” It further argues that the end of the Cold War has led us to a current period of “New Peace” in which “a key proximate cause” is the “UN spearhead[ing] a massive upsurge of international activism directed towards preventing wars, stopping those that could not be prevented, and preventing those that had stopped from reigniting.” An earlier version of the report found that after the Cold War we saw a “fivefold increase in the number of diplomatic interventions intended to bring armed conflicts to a negotiated settlement” such as the U.N.’s involvement to settle civil wars in Cambodia, El Salvador, Guatemala, Liberia and Mozambique.

Schlesinger praises the U.N. Trusteeship Council, and Stettinius’ compromise that ensured “independence” would be a core principle of the council’s work, for sparking the “almost total decolonization of the world.” He recounts former U.N. official Sir Brian Urquhart’s conclusion that “the three chapters of the Charter on dependent peoples and trusteeship gave a momentum and a legitimacy to decolonization.” None of this might have happened without clandestine surveillance guiding American diplomats through terribly thorny territory as the U.N. was just getting off the ground.

After U.N. conference spying was uncovered in the mid-1990s, by a Freedom of Information Act request from a researcher who was looking into the decision to drop atomic bombs on Japan, cryptography historian David Kahn said it was only the second known instance when “cryptanalysis has significantly affected world events in peacetime.” (The prior example was when the United States broke Japanese codes to help negotiate a 1922 disarmament treaty.) But more recently we have learned of another instance of both CIA and NSA surveillance similarly fostering peace: the Camp David Accords, which has kept the peace between Israel and Egypt for 35 years and counting.

Last November, the CIA released hundreds of pages of classified memos regarding the U.S. government’s preparation for the 1978 talks, including “significant background research as well as continuing monitoring of the target leaders” to develop personality profiles of Israeli Prime Minister Menachem Begin and Egyptian President Anwar Sadat, strongly suggesting surveillance was used. The CIA would not officially confirm it when asked by the Wall Street Journal. But in a Carter Center panel discussion held right after the declassified documents were released, veteran CIA intelligence officer Martha Neff Kessler, who was involved with Camp David, said, “My recollection is that a great deal of it was clandestinely collected information … in a lot of the interchange on the Palestinian issue, some it was intercepted traffic … I would say, just really having to guess here, somewhere between 10 to 15 percent of what I was reading every day was CIA-collected information. The rest was a variety—NSA [and] open source … It didn’t constitute the majority of what we were reading, [but] it was the most critical.”

President Jimmy Carter implied that he had ordered the intelligence community to capture what the Israelis and the Egyptians were saying privately. He told the same Carter Center audience that he instructed the CIA to “prepare for me a personal profile, a complete analysis, of the character of Begin and Sadat,” including “what were their attitudes toward me, and what were they toward the United States when they spoke in private … and what were their attitudes toward each other both publicly and privately.” Michael Hayden, the NSA director under President George W. Bush, in a March interview with Der Spiegel, elaborated on Carter’s admission to explain why President Obama might be listening in on foreign leaders today: “How are you going to do that? I suspect you’re going to conduct aggressive surveillance against their communications.”

Because the exact nature of the Camp David surveillance isn’t fully known, we can’t say in what precise way it facilitated the agreement that came out of those talks. But Carter, in his remarks at the Carter Center , highlighted one area where knowing the private feelings of Begin and Sadat was essential. He said he had asked the CIA to find out whom Begin and Sadat each trusted in their own delegations. As it turned out, Carter explained, Begin “didn’t really trust any of his cabinet members completely. He trusted his attorney general [Aharon] Barak, [while Sadat] trusted Osama el-Baz … his private political adviser. And those were about the only ones within their own delegations of almost 50 people that they really trusted. And that turned out to be crucial during the final days of the negotiations.” Based on the personality profiles, Carter deemed it necessary to keep Begin and Sadat completely apart during negotiations to avoid squabbles, but Barak and el-Baz were able to be in the same room and work out acceptable language. It would appear that information gleaned from clandestine surveillance contributed to this negotiation strategy.

Perhaps in time, the Snowden leak will have given us a fourth example of successful surveillance in the pursuit of peace. One of the new scoops from Glenn Greenwald’s new book based on his NSA reporting, No Place To Hide, is that in 2010 President Obama’s first U.N. ambassador, Susan Rice, “repeatedly requested that the NSA spy on the internal discussions of key member states to learn their negotiation strategies” regarding a resolution to impose sanctions on Iran for not complying with restrictions on its nuclear program. One NSA memo written after the Security Council resolution passed, published by Greenwald and further reported on by the New York Times, quotes Rice praising the intelligence for helping win the vote: “[Signals intelligence] helped me know when the other Permreps [China, England, France and Russia] were telling the truth … revealed their real position on sanctions … gave us an upper hand in negotiations … and provided information on various countries’ ‘red lines.’”

While those sanctions by themselves were not considered particularly tough, they were part of a broader U.S.-led sanctions strategy that some contend compelled Iran last year to temporarily suspend much of its program and begin engaging in deeper talks with the West. If the resolution had failed, exposing division in the international community, Obama’s entire diplomatic approach to Iran could have been doomed.

The coverage of the Snowden leaks has illuminated the risk of spying on one’s allies: They might find out and your relationships will be damaged. Recent revelations that the United States was spying on the German and Brazilian heads of state have left bruises: Brazil canceled a U.S. state visit and recently chose to buy a set of Swedish military planes instead of American ones, while Germany is responding to domestic outrage by trying to convince Obama to accept a “no-spy” agreement.

But bruised is not broken. In early May, President Obama hosted German Chancellor Angela Merkel at the White House, where they offered a united front in support of the Ukrainian government and pledged to work towards a European trade agreement. A few days later the administration announced that Vice-President Joe Biden will travel south next month to meet with Brazilian President Dilma Rousseff.

In turn, President Obama appears to be concluding that the value of clandestinely obtained political intelligence in conducting foreign policy outweighs the risks. He may rhetorically express concern, and reassure that he will “rebuild trust” with reforms. Yet he stops short of apologizing for past actions and fully scrapping surveillance on allies, as in the case of his resistance to Germany’s “no-spy” push. He has only committed that America won’t spy on allies “unless there is a compelling national security purpose,” but effective diplomacy can always be justified as serving national security.

Considering the above history, Obama’s calculation makes sense. The NSA’s proven utility in facilitating complex peace initiatives erases the caricature of an American intelligence community that craves, in Greenwald’s words, “a spying system that exists simply to spy for its own sake, to augment the power of the United States government.” In the caricature’s place, we can see an agency that had and has legitimate purpose. We can understand that its inherently secretive nature, while posing a risk for abuse that must always be guarded against, also provides our diplomats with the tools needed to defuse some of the toughest challenges to peace and freedom.

Sure, there are plenty of historic examples of the U.S. intelligence community failing to live up to this country’s democratic ideals. But, just as we acknowledge those, we should also recognize that there are critical times when the United States used intelligence precisely to advance those ideals. Because of it, today the world is a better place.