AP photo.

U.S. surveillance has been happening "on automatic pilot" and in some cases have gone "too far inappropriately," Secretary of State John Kerry said Thursday.

Participating via teleconference in a summit on governmental transparency, Kerry responded to a question about surveillance and trust in government by offering the some of the lengthiest on-record comments by any high-level U.S. government official on the recent wave of reports about U.S. surveillance.

Kerry acknowledged that he and President Obama "learned of" these programs-suggesting Obama did not know about the programs during the entire time in which they were conducted. The president and others have dodged questions on whether Obama was in fact unaware of the programs, particularly reported eavesdropping on foreign leaders. U.S. government officials have been reluctant to discuss "alleged" activities and details reported by various news outlets, including The Guardian, the German magazine Der Spiegel, and The Wall Street Journal.

"There is no question that the president and I and others in government have actually learned of some things that had been happening, in many ways, on an automatic pilot because the technology is there," Kerry told the Open Government Partnership Annual Summit, moderated in London by British journalist Rageh Omar, on a panel that included British Foreign Minister William Hague.

"I assure you innocent people are not being abused in this process, but there's an effort to try to gather information. And yes, in some cases, it has reached too far inappropriately," Kerry said.

Kerry defended the large-scale surveillance that has come under criticism, asserting that it has prevented terrorist attacks.

"So what if you were able to intercept that and stop it before it happens? We have actually prevented airplanes from going down, buildings from being blown up, and people from being assassinated because we've been able to learn ahead of time of the plans," Kerry said.