Washington - Leaks from former US intelligence contractor Edward Snowden triggered a much needed debate about surveillance in America, even if they jeopardised national security, the country's spy chief admitted on Thursday.
"As loathe as I am to give any credit for what's happened here, which is egregious," said National Intelligence Director James Clapper, "I think it's clear that some of the conversations that this has generated, some of the debate... actually probably needed to happen."
Speaking at a conference in Washington, Clapper said the public debate about the best way to balance spying powers and privacy rights should "perhaps" have taken place earlier.
"So if there's a good side to this, maybe that's it," he said.
His comments marked the first time a senior US intelligence official has acknowledged the leaks might not have had a solely negative impact.
Officials have previously labelled Snowden a traitor who endangered America's interests and spies in the field.
Clapper, who oversees all 16 US intelligence agencies, predicted there would be more revelations from Snowden, and said he was worried about their long-term effects.
He said he was concerned about "the impact, frankly, on our national security and the damage caused by these continuous stream of revelations".
But he said the intelligence community should be more open about its work, even if that meant taking more risks, to ensure that Americans and their representatives in Congress trusted their spy services.
He said his office had this week declassified hundreds of pages of documents from the court that oversees electronic surveillance as part of an attempt to be more transparent.
"Transparency of course is a double-edged sword. It's great for us, great for our citizens. But of course the adversary goes to school on that transparency too," he said.
"But I'm convinced we have to err on the side of more transparency because, most importantly, we won't have any of this if we don't have the trust and confidence of citizens and their elected representatives."
Clapper said he had met with executives from some news media companies to discuss the fallout from the Snowden leaks and found a "big gulf" between how the two sides viewed what affects national security.
And he acknowledged that it was difficult to make the case publicly for current surveillance powers in the aftermath of a wave of bombshell revelations.
It was "a real challenge to sort of punch back and make the alternative case," he said.
"So one of the things we're doing, obviously, is to try to open up, be more transparent, explain to people what we're doing."
To prevent more leaks from insiders, the intelligence agencies were working to improve security clearances and to introduce a single system for all the spy agencies' computer services, he said.
Snowden had worked as a subcontractor in a National Security Agency regional office in Hawaii before handing over secret documents to newspapers that lifted the lid on the extent of US surveillance, including trawling through Americans' phone records and online traffic.
Snowden, who has been charged with espionage by US authorities, has secured temporary asylum in Russia, and his disclosures continue to trickle out in the Guardian and other publications.
President Barack Obama has defended the NSA's surveillance as lawful but has left the door open to more oversight from Congress or through other measures.
Clapper, who addressed an intelligence and security alliance "summit," said he expected new legislation to revise surveillance authorities, and that the changes would be helpful if it helped shore up public confidence.
But he said the NSA, for which he worked earlier in his career, was "an honourable institution" that deserved respect for its work.