US intelligence chiefs used an appearance before Congress on Thursday to urge lawmakers not to allow public anger over the extent of government surveillance to result in changes to the law that would impede them from preventing terrorist attacks.

General Keith Alexander, the director of the National Security Agency, conceded that disclosures by the whistleblower Edward Snowden "will change how we operate". But he urged senators, who are weighing a raft of reforms, to preserve the foundational attributes of a program that allows officials to collect the phone data of millions of American citizens.

In testy exchanges at the Senate intelligence committee, Alexander and the director of national intelligence, James Clapper, refused to say on the record where the NSA had ever sought to trawl cell site data, which pinpoints the location of individuals via their phones.

They were challenged by Democratic senator Ron Wyden who, as a member of the committee, has for years been privy to classified briefings that he cannot discuss in public. "You talk about the damage that has been done by disclosures, but any government official who thought this would never be disclosed was ignoring history. The truth always manages to come out," he said.

"The NSA leadership built an intelligence data collection system that repeatedly deceived the American people. Time and time again the American people were told one thing in a public forum, while intelligence agencies did something else in private."

Wyden and his fellow Democrat Mark Udall used the public hearing to press the intelligence chiefs on aspects of the top-secret surveillance infrastructure.

Asked by Udall whether it was the NSA's aim to collect the records of all Americans, Alexander replied: "I believe it is in the nation's best interest to put all the phone records into a lockbox – yes."

He would not be drawn on any past attempts or plans to store cell site data for security reasons. The NSA director evaded repeated questions from Wyden over whether the NSA had either collection of cell site phone data, or planned to do so. Alexander eventually replied: "What I don't want to do senator is put out in an unclassified form anything that is classified."

Alexander and Clapper also strongly criticised the media for over its publication of Snowden's disclosures, which they suggested had been misleading. Neither of the intelligence chiefs, nor any of the senators who criticised media reporting, indicated which news organisations or particular reports were misleading, or in what way.

Alexander said that while recent disclosures were likely to impact public perceptions of the NSA and "change how we operate", any diminution of the intelligence community's capabilities risked terrorist attacks on US territory.

He told the committee that over one seven-day period this month, 972 people had been killed in terrorist attacks in Kenya, Pakistan, Afghanistan, Syria, Yemen and Iraq. "We need these programs to ensure we don't have those same statistics here," he said.

Alexander said that violations of the rules governing surveillance powers were not common and "with very rare exceptions, are unintentional". Clapper also admitted to violations, saying "on occasion, we've made mistakes, some quite significant", but stressed those were inadvertent and the result of human or technical errors.

In a joint written submission with James Cole, the deputy attorney general, who also gave evidence to the committee, they said they were "open to a number of ideas that have been proposed in various forms" relating to the routine trawl of millions phone records of Americans under section 215 of the Patriot Act.

The trio said they would consider statutory restrictions on their ability to query the data they gather and disclosing publicly how often they use the system. However, there was no suggestion in the written submission that they would contemplate any infringement on the bulk collection and storage of the phone records, a proposal contained in bills being put forward in the House of Representatives and Senate.

"To be clear, we believe the manner in which the bulk telephony metadata collection program has been carried out is lawful, and existing oversight mechanisms protect both privacy and security," they stated.

The trio said they were also open to discussing legislation under which the foreign intelligence surveillance (Fisa) court would at its discretion solicit the views of some kind of independent figure in cases that raise broader civil liberties issues.

This falls short of the draft legislation calling for the appointment of a "constitutional advocate", which Wyden, Udall and other senators are pushing for in a bipartisan bill unveiled on Wednesday night.

At the start of the hearing, the Democratic chair of the committee, Diane Feinstein, outlined a separate bill she is introducing with Republican vice-chairman Saxby Chambliss.

Their proposed legislation broadly echoes the small tweaks the intelligence establishment says it will consider, but does not go further. Feinstein said their bill would change but preserve the program of collecting and storing phone records of Americans under section 215 of the Patriot Act.

She echoed criticisms of the media reporting of Snowden disclosures, said she was confident NSA surveillance programs were "lawful, effective and they are conducted under careful oversight". She asserted that the program by which intelligence officials secretly collect millions of phone metadata, and can be used to provide a detailed breakdown of an individual's movements life, was not a form of covert monitoring. "Much of the press has called this as surveillance program," she said. "It is not."

Chambliss said that "while we are here in large part because of the Snowden leaks", they had caused huge damage to the US and its interests and "would ultimately claim lives", something he said Snowden should be held to account for.

Feinstein and Chambliss are the two members of Congress who arguably have the biggest mandate to hold the intelligence establishment to account.

Their bill would not limit the collection of phone records, but rather introduce some restrictions on when intelligence officials are permitted to search the data, and requirements of the intelligence agencies to disclose how often they use the program.

It would also partly widen the powers of the NSA, allowing laws that authorise foreign spying to be continued for a period of time after targets enter US territory.

Mid-hearing on Thursday, Feinstein read out excerpts from an email she said she had received on her BlackBerry from the Obama administration, pertaining to the wording that might be used to describe a special advocate lawyer in the Fisa court.

Other senators on the committee criticised media reporting and argued the essence of the surveillance apparatus should be left in place. Republican senator Dan Coats said journalists were throwing "raw meat out there", suggesting the reporting was misleading the public. He cautioned against overreacting "for fear of the public saying, 'Oh, that headline makes me nervous.'"

Democrat Jay Rockefeller said that public misunderstandings risked dismantling a system of surveillance that has taken a decade to construct in the aftermath of the September 11 attacks. "You don't build a Roman fort and then build another one next door because you've made a mistake," he said.

Clapper responded that the agencies were finding ways to "counter the popular narrative".

This article originally appeared on guardian.co.uk