Three years ago today, The Guardian published the first story based on the huge archive of documents that that Edward Snowden stole from the National Security Agency while working as an NSA contractor. Then-Attorney General Holder’s Justice Department quickly charged Snowden with felonies for theft of government property and mishandling classified information. Last week, however, Holder praised Snowden. “I think that he actually performed a public service by raising the debate that we engaged in and by the changes that we made,” Holder said.

This seems like an improbable claim. Snowden compromised scores of surveillance techniques, representing billions of dollars of investments over many years. U.S. firms that secretly cooperated with government intelligence agencies stopped doing so to the extent they could, and public defiance became the business-compelled norm. Firms made encryption more readily available and easier to use, which made it harder for the U.S. government to monitor communications and access data. Many foreign governments responded with countermeasures like data localization laws, tighter privacy rules, and closer judicial scrutiny of U.S. collection practices.

The Defense Department claimed that the “scope of the compromised knowledge related to US intelligence capabilities” as a result of Snowden was “staggering.” This claim is unverifiable but seems plausible in light of the breadth of and reaction to the disclosures. The intelligence losses extend beyond counterterrorism, the main context in which these issues are typically discussed. NSA collections undergird every element of U.S. national security and foreign policy—including its extensive military operations around the globe, its pervasive diplomatic engagements, and its numerous economic negotiations and initiatives. Knowledge of what an adversary or other foreign intelligence target is doing or planning gives the United States a huge advantage in its myriad international affairs, and is central pillar of American power. Such knowledge is harder to come by as a result of Snowden.

And yet Holder is still right. At the dawn of the Snowden revelations, many wondered (and hoped) that the U.S. intelligence community would be destroyed. But the opposite has happened. Despite undoubted intelligence losses, new collection barriers, and diplomatic embarrassments, the community has emerged as a stronger organization despite, indeed because of, Snowden.

Snowden forced the intelligence community out of its suboptimal and unsustainable obsession with secrecy. “Before the unauthorized disclosures, we were always conservative about discussing specifics of our collection programs, based on the truism that the more adversaries know about what we're doing, the more they can avoid our surveillance,” Director of National Intelligence James Clapper said in 2013. Post-Snowden, the intelligence community operates on the principle that secrecy is not an absolute value, but one that needs to be traded off for other values, including domestic legitimacy. Snowden made it realize that, in the words of former NSA Director Michael Hayden, “although the public cannot be briefed on everything, there has to be enough out there so that the majority of the population believe what they are doing is acceptable.”

Forced transparency meant that the intelligence community had to justify itself before the American people for the first time ever—about what it did in the domestic arena and abroad, about the legality of and accountability for its actions, and about its importance to U.S. national security. It had to open itself up to through scrutiny and judgment by many new institutions, including the President’s Review Group, and a Privacy and Civil Liberties Oversight Board (PCLOB). Initially this was a painful, even bewildering process since the intelligence community had no experience at, and thus wasn’t any good at, explaining itself. But the transparency turned out to bring many benefits.

First, the intelligence community opened up. It got much better at talking to the public. And the sky did not fall.

Second, the intelligence community had a good story to tell. Credible public evidence emerged that the NSA was a thoroughly accountable institution performing a vital intelligence role. “Every program was authorized and approved, and whatever one thinks of the programs, it was not a case of running amok or exceeding its authority,” said civil libertarian and Chicago law professor Geoffrey Stone, a Review Group member. And the value of NSA programs were publicly revealed more extensively than ever. The PCLOB concluded that the 702 PRISM and upstream programs “played a key role in discovering and disrupting specific terrorist plots aimed at the United States and other countries.” These claims by outsiders to (and in some instances, adversary critics of) the intelligence community are significantly more credible, and legitimizing, than when the community itself makes the same sorts of claim.

Third, the main criticisms of the NSA ended up having silver linings. It emerged from the Snowden documents (and further voluntary releases by the government) that the NSA sometimes had problems complying with judicial orders, usually because of the difficulty of meshing legal directives with extraordinary complex technical collection processes. And yet these embarrassments also showed that the FISA court that monitors the NSA in secret was not, as many claimed, a rubber stamp. It was, instead, an important independent check on NSA activities. As a result of Snowden, the FISA court is a much more credible institution that can and in the future will be relied upon more thoroughly to monitor expanded NSA activities in secret.

Another criticism of the NSA was that its aggressive collection processes abroad did not consider the rights and interests of foreign individuals and firms. The main response was Presidential Policy Directive 28, which imposed restraints on collection abroad in the interests of non-U.S. citizens. PPD 28 does not have sharp teeth and, while it has reportedly been a pain to implement, will not likely have a material impact on U.S. collection practices. Like many post-Snowden reforms, it imposes process and oversight constraints and forces NSA to be more prudent in its collection practices. PPD-28 (along with the Judicial Redress Act, which extended Privacy Act protections to foreign citizens) has the side-benefit that the United States can now proudly and truthfully claim to have the most robust protections for non-citizens of any signals collection agency in the world.

Fourth, and perhaps most surprisingly, the intelligence community has been able to maintain and strengthen the legal authorities for its collection practices. The bulk telephone metadata program was legally and on the merits the most controversial program that Snowden revealed, and the one that the NSA seemed least interested in preserving. The USA Freedom Act made some important reforms to this program—most notably, by replacing NSA collection and storage of the metadata with carrier storage of the data and by requiring more limited NSA querying of the data pursuant to court approval. And yet the NSA has ended up in a stronger position as a result. It gets access “a greater volume of call records” than before, according to the NSA general counsel, and probably at a lower cost to itself, since it no longer needs to store and organize the massive quantities of data. And even more importantly, the program has now been vetted publicly and expressly baked into the legal system, giving it a legitimacy and almost certainly a longevity that it never could have achieved in secret.

The improbable preservation and strengthening of the bulk telephone metadata program—the least valuable and hardest-to-justify of the programs that Snowden revealed—is emblematic of the types of changes Snowden wrought. Few if any important intelligence collection programs have ended as a result of Snowden, and the USA Freedom Act reforms actually expanded some intelligence community authorities. The intelligence community has had to subject itself to more scrutiny and process checks, and it has had to trim its sails a bit to make its practices more proportional to the ends it seeks. But the transparency resulted in public debates that concluded that the NSA practices were in the round worth preserving.

From the baseline of what almost everyone expected when the scale of Snowden’s revelations first became apparent, the intelligence community, and especially the NSA, have emerged in astonishingly good shape. The NSA is still very much in the business of aggressive signals intelligence around the globe. Its domestic legal authorities are sounder. Its value is more apparent to the American public. It is much more adept at public diplomacy. And its central and expanding role going forward—not just for signals intelligence collection, but for cybersecurity and offensive cyber operations—are secure.

These are but some of the public services for which the U.S. government has Snowden to thank.