The decision to keep secret the National Security Agency's collection of American calling records was a strategic blunder that set the stage for Edward Snowden's unauthorized disclosures and ultimately harmed U.S. national security, the agency's former inspector general told NSA employees in blunt remarks Friday.

"You now live in a glass house," Joel Brenner, NSA inspector general from 2002 to 2006, said in a speech marking the 40th anniversary of the congressional hearings into the intelligence scandals of the Watergate era. "How could anyone think the bulk collection program would remain secret?"

It's not that there no longer can be national security secrets, said Brenner, a lawyer who retired in 2009 after serving as the top U.S. counterintelligence official. But "the idea that the broad rules governing your activities — not specific operations, but the broad rules_can be kept secret is a delusion. And they should not be kept secret."

Snowden, a former NSA systems administrator, has said he decided to leak thousands of top secret documents to journalists because of what he viewed as deception by Director of National Intelligence James Clapper, when he denied to Congress in 2013 that the U.S. was collecting records on millions of Americans. But Snowden went on to reveal programs that had nothing to do with domestic surveillance, but rather involved NSA's foreign intelligence gathering operations.

Clapper and other officials have said they wished the government had been more transparent about the NSA program that since 2002 has collected and stored records of nearly all American landline phone calls for use in counterterrorism investigations, but none put it as starkly as Brenner did. Congress is now debating whether to end the program before the Patriot Act provisions allowing it expire on June 1.

"If you disagree with me on this, do your own damage assessment," Brenner said, according to text of his remarks that he provided. "In the wake of Snowden, our country has lost control of the geopolitical narrative; our companies have lost more than $100 billion in business and counting."

Intelligence collection "has surely suffered," he said, as has NSA morale. And "the damage from the Snowden leaks to American foreign intelligence operations, to American prestige, and to American power ... has unquestionably been vastly greater" than if the George W. Bush administration had gone to Congress in 2002 to seek legislation authorizing the collection of U.S. phone records.

The Bush administration didn't want to do that for political reasons, Brenner said, and neither did the Obama administration.

Instead, both presidents relied on a classified interpretation of the Patriot Act by a secret intelligence court. And the NSA collected the records secretly.

When Snowden revealed the program in 2013, "the argument that the agency was operating under 'secret law' had legs with the public, much of which is allergic to bulk collection and doubts its value," Brenner said.

The criticism over the Snowden revelations has been hard for career intelligence professionals to swallow, Brenner said, given that there has been no evidence of the sort of abuses that were uncovered by Sen. Frank Church and Rep. Otis Pike 40 years ago.

Much of the Snowden leaks simply showed "how extremely good NSA really is at its business," Brenner said. And "there hasn't been even a whiff of intelligence abuse for political purposes," he said. "This was the only intelligence scandal in history involving practices approved by Congress and the federal courts and the president."

By contrast, he said, the NSA's Project Minaret, exposed by the Church Committee, eavesdropped without warrants on 1,650 Americans who were considered political targets, including two senators, many critics of the Vietnam War, prominent journalists, and the boxer Muhammad Ali.

"Everyone associated with these various programs thought that he was a patriot acting in the national interest," Brenner said "Which is precisely why subjective notions of patriotism and national security are insufficient guides for people and agencies that claim to operate under law in a democratic republic."