Moving to tamp down a public uproar spurred by the disclosure of two secret surveillance programs, the nation's top intelligence official is declassifying key details about one of the programs while insisting the efforts were legal, limited in scope and necessary to detect terrorist threats.

Director of National Intelligence James Clapper (Win McNamee/Getty Images)

Director of National Intelligence James Clapper, in an unusual late-night statement Thursday, denounced the leaks of highly classified documents that revealed the programs and warned that America's security will suffer. He called the disclosure of a program that targets foreigners' Internet use "reprehensible," and said the leak of another program that lets the government collect Americans' phone records would affect how America's enemies behave and make it harder to understand their intentions.

"The unauthorized disclosure of a top secret U.S. court document threatens potentially long-lasting and irreversible harm to our ability to identify and respond to the many threats facing our nation," Clapper said of the phone-tracking program.

At the same time, he offered new information about both programs, saying he wanted to correct the "misleading impression" created by out-of-context news articles even as he acknowledged that publicly discussing the programs comes with inherent security risks.

"I believe it is important for the American people to understand the limits of this targeted counterterrorism program and the principles that govern its use," Clapper said.

(Copyright 2013 The Associated Press. All Rights Reserved)