WASHINGTON (AP) — At a House Intelligence Committee hearing just a month ago on highly controversial National Security Agency surveillance issues, administration officials were well treated by both Republicans and Democrats. Wednesday’s return trip to Capitol Hill was decidedly different.

For James Cole, John Inglis and Robert Litt, the latest session with Congress was a lesson in the dangers of using the same comments twice before highly different audiences. What worked in the House Intelligence Committee wasn’t working Wednesday before the House Judiciary Committee.

“We are constantly seeking to achieve the right balance between the protection of national security and the protection of privacy and civil liberties,” said Cole, the No. 2 official at the Justice Department.

“You’ve already violated the law as far as I am concerned,” the panel’s ranking Democrat, John Conyers, told the intelligence officials at the hearing.

Cole was echoing statements that countless administration officials, including the president, have used in an effort to justify the collection of phone record “metadata” on all Americans.

The tactic of collecting everything was unknown to the public until former NSA contractor Edward Snowden leaked word of it to the public six weeks ago.

On Wednesday, when the time came for questions, House Judiciary Committee chairman Bob Goodlatte, R-Va., was ready.

“Given the magnitude of this program, I’m frankly surprised it has remained secret,” said Goodlatte. “Why not simply have told the American people that we’re engaging in this type of activity in terms of gathering information? It doesn’t give away any national security secrets in terms of the particular information gathered … but it might have engendered greater confidence in the public.”

A judgment was made that to disclose the existence of this program “would in fact have provided information to people who were seeking to avoid our surveillance,” replied Litt, the general counsel to the Office of Director of National Intelligence.

A sound argument perhaps, and one that would likely have been well-received at the House Intelligence Committee hearing on June 19. But it wasn’t enough to dissuade Rep. James Sensenbrenner, R-Wis., from telling the administration officials what he thought of their refusal to acknowledge some of the House Judiciary Committee’s criticism.

“Unless you realize you’ve got a problem, the phone records program “is not going to be renewed” by Congress, Sensenbrenner said flatly. The administration says the database was authorized under a provision in the Patriot Act that Congress hurriedly passed after 9/11 and reauthorized in 2005 and 2010.

Sensenbrenner, the sponsor of that bill, said Congress’ intention was only to allow seizures directly relevant to national security investigations. No one expected the government to obtain every phone record and store them in a huge database to search later.

In testimony that could stir more controversy, Inglis disclosed that the NSA sometimes conducts what’s known as three-hop analysis. That means the government can look at the phone data of a suspect terrorist, plus the data of all his contacts, then all those people’s contacts, and finally, all those people’s contacts.

If the average person calls 40 unique people, three-hop analysis could allow the government to mine the records of 2.5 million Americans when investigating one suspected terrorist.

The House Judiciary Committee hearing represented perhaps the most public, substantive congressional debate on surveillance powers since the 9/11 terrorist attacks — with committee Republicans and Democrats for the most part on the same page. Previous debates have been largely theoretical and legalistic, with officials in the Bush and Obama administrations keeping the details hidden behind the cloak of classified information.

On June 18, Cole, Litt and Inglis, who is the deputy director and senior civilian at the NSA, were among the intelligence officials receiving a warm reception from the House Intelligence Committee.

“I do believe that America has the responsibility to keep some things secret as we serve to protect this country. And I think you all do that well,” said House Intelligence Committee chairman Mike Rogers, R-Mich. In regard to the hearing that day, it’s “important to have a meeting where we could at least, in some way, discuss and reassure the level of oversight and redundancy of oversight on a program that we all recognize needed an extra care and attention and lots of sets of eyes.”

“This is very important that we get the message out to the American public that what we do is legal and we’re doing it to protect our national security from attacks from terrorists,” said Rep. C.A. Ruppersberger, the House Intelligence Committee’s top Democrat.