The story of America's biggest intelligence leak started simply: with an email.

It was December 2012, and Guardian journalist and blogger Glenn Greenwald had received a cryptic message from an unfamiliar address: "I've got some stuff you might be interested in." A longtime critic of the modern American surveillance state, Greenwald assumed it was a dead lead. But for months, the same messenger, writing under the name Verax, promised American documentary filmmaker Laura Poitras and Washington Post national security reporter Barton Gellman an "unprecedented" scoop — one for which he was willing to risk both his freedom and his life. Eventually, Verax invited Poitras and Gellman to meet him in Hong Kong. Gellman declined, but Poitras went with Greenwald and Guardian reporter Ewen MacAskill in tow.

The rest is very recent history. Verax ended up being Edward Snowden, then a 29-year-old former NSA contractor who had secreted away to Hong Kong with a massive cache of classified documents outlining the size and scope of the U.S. government's surveillance apparatus. Snowden did what no whistleblower had managed to accomplish since the Pentagon Papers: He pulled back the curtain on the modern American surveillance state and showed the depths of the NSA's collecting, storing and analyzing the personal data of millions of Americans. What's worse: It appeared to be legal.

But where did this modern surveillance state, this many-headed hydra that Snowden sought to spear, come from? This is the subject of the United States of Secrets, a two-part series airing on PBS's award-winning documentary series Frontline on Tuesday and May 20, about one year after Snowden's intelligence disclosures. Drawing on rich testimony from more than 60 whistleblowers, elected officials and intelligence insiders, United States of Secrets reveals the dramatic inside story of the U.S. government's massive and controversial secret surveillance program — and the lengths officials went to keep it hidden from the public.

The first part of Frontline's exhaustive look at the modern intelligence state begins on Tuesday with "The Program," a deep exploration of the U.S. government's new intelligence regime, which began to take shape in the hours after the first plane struck the North Tower of the World Trade Center on Sept. 11, 2001. Veteran investigative filmmaker Michael Kirk captures the abject panic and vulnerability roiling the NSA. "Everyone had the TV on because the TV was where the news was," former NSA analyst J. Kirk Wiebe told Frontline. "It wasn't coming out of the NSA's computers, it was on the TV, because we had missed the entire event."

Kirk's documentary is rich with emotional testimony from former NSA employees, and shows that 9/11 was not just an intelligence failure. It was an intelligence humiliation. The NSA was established after World War II to prevent another Pearl Harbor, but intelligence officials found themselves facing an updated version of the horrifying attack. "It was an enormous shock that you have this entire agency set up to prevent a surprise attack, and they learn about it on a $300 TV set tuned to CNN in the director's office," says longtime NSA journalist James Bamford.

Frontline paints a terrifying portrait of how the fear, anxiety and anger of the attacks gave way to the warrantless surveillance efforts that would form the basis of "The Program." In the documentary, the gloves come off: Former Cheney legal counsel and Chief of Staff David Addington tells Frontline, that the executive branch was "going to push and push until some larger force makes us stop." The directive to NSA staffers came from Hayden: We needed to fix this, we need to prevent another 9/11, we need to make sure this never happens again. After all, what good was an intelligence agency that couldn't even find the dots, let alone connect them?

Under pressure from the White House and senior officials, Hayden visited the Oval Office to outline "The Program" less than a month after 9/11. The agency would gather data on the phone calls and Internet traffic of millions of Americans, and mine it for credible information. On Oct. 4, in a secret signing with Cheney, the president officially signed "The Program," which presumed a level of executive authority unprecedented in American history. The authorizing document would become one of the most closely kept secrets in the history of the Bush-Cheney administration.

Until, that is, Greenwald and Lauren Poitras' fateful visit with Snowden in Hong Kong. But despite the disclosures wrought by Snowden and other whistleblowers, the fear and anxiety that permeated the origins of "The Program" have left their mark on how the U.S. government thinks about surveillance. Snowden may have pulled back the curtain on the modern electronic surveillance, but as Frontline shows, putting the genie back in its bottle may prove far more complex a challenge than the contractor ever imagined.