The Guardian's editor-in-chief, Alan Rusbridger, argued before the home affairs select committee that there was a public interest in revealing details of secret surveillance programmes based on files leaked by Edward Snowden, and said newspapers had played a vital role in exposing the scale and scope of British and American intelligence agency spying activities. Some of the exchanges from the hour-plus session of the home affairs select committee follow:

Public interest

Julian Huppert, a committee member, argued that the Snowden files "touched on issues which are of fundamental national importance ... and a whole range of things about the future of privacy in a digital age."

The LibDem MP said: "In Germany there is huge interest in this subject, in the US there is huge interest ... why do you think there has been so little interest here ... what we have seen is attacks on the Guardian rather than parliament trying to work out what the rules ought to be. Why do you think that is?"

Rusbridger said : "Shooting the messenger is the oldest diversionary trick in the book. My experience is that when you speak to people and explain the issues, they are deeply interested. I can't think of any story in recent times that has ricocheted around the world like this and which has been more broadly debated in parliaments, in the courts amongst NGOs.

"The roll call of people who have said there needs to be a debate about this includes three presidents of the United States, two vice-presidents, generals ... the security chiefs in the US are all saying this a debate that in retrospect we know that we had to have ...There are members of the House of Lords, people who have been charged with oversight of the security measures here. The former chair of the intelligence and security committee, Tom King, said this was a debate that had to be had and they had to review the laws. The director of national intelligence in the US said these were conversations that needed to happen. So in terms of the public interest, I don't think anyone is seriously questioning this – this leaps over the hurdles of public interest."

Oversight

Keith Vaz, the committee's chairman, asked Rusbridger if the Guardian had felt driven to publish the stories about surveillance because of the weakness of the oversight and scrutiny regimes over the intelligence agencies.

The Labour MP asked: "Are you telling this committee that as a result of parliament's failure to oversee the security services, and the failure to have the necessary expertise, and the failure to have a sufficient budget, that's why you were obliged to publish, otherwise nobody would have found out."

Rusbridger: "Well, the only way this information has come into the public domain has been through the press."

Vaz: "So we should look at our structures?"

Rusbridger: "We should and America is."

Vaz: "In respect of our counter-terrorism inquiry, do you think it would be good if we looked at the structures of oversight?

Rusbridger: "Absolutely. I think that would be an important thing to do."

An enigma

During one passage of hostile questioning, a Tory member of the committee, Michael Ellis, became so agitated he was rebuked by the committee chair.

Ellis: "You authorised files stolen by Snowden which contained the names of intelligence staff, to be communicated elsewhere, didn't you? Yes or no."

Rusbridger: "I have already dealt with that. It has been known for six months."

Ellis: "Do you accept that [the files] contained personal information could lead to the identity even of the sexual orientation of persons working within GCHQ?"

Rusbridger: "If you can explain how we have done that ..."

Ellise: "On August 2, you refer to the fact that GCHQ has its own Pride group. That jeopardises those individuals."

Rusbridger: "You have completely lost me, Mr Ellis. That there are gay people in GCHQ? Is that a surprise? ... The mention of a Pride group in GCHQ, you can find the same information on the Stonewall website. I fail to see how that outs a single member of GCHQ."

Choosing a historical comparison, the Conservative MP asked: "If you had known about the Enigma code in World War Two, would you have transmitted that information to the Nazis?"

Rusbridger: "That is a well-worn red herring, if you don't mind me saying so, Mr Ellis. I think most journalists can make a distinction between the kind of things you are talking about. I think we can make those distinctions."

Ellis: "Have members of the board of the newspaper conceded to you that the law may have been broken on this matter?"

Rusbridger: "No."

Vaz: "This needs to be your final question."

Ellis: "No, I think it is less than six minutes."

Vaz: "Mr Ellis, order, I am chairing this meeting. This is your final question."

Ellis: "This is not a Labour love-in."

Possible prosecution

Another Tory MP, Mark Reckless, also asked if the Guardian might face prosecution.

The MP asked: "I understand if you choose not to answer this question, but do you consider that you have communicated information on the identities of staff of intelligence agencies out of jurisdiction contrary to 58A of the terrorism act.".

Rusbridger said: "It has been known to the government for many months" that the Snowden files "included a good many documents that had names of security people working for both the NSA and GCHQ" that had been shared with the New York Times.

Reckless then asked: "Which you would accept constitutes communicating it outside the UK?"The editor-in-chief replied that "self-evidently they work in New York".

Seizing on this, the MP said: "You have, I think, Mr Rusbridger, admitted a criminal offence in your response just then. Do you consider that it would not be in the public interest for the CPS [crown prosecution service] to prosecute or should that be dealt with by the authorities in the normal way?"

Rusbridger: "I think it depends on your view of a free press, really. In America, the attorney general, Eric Holder, came out within the last two weeks and said that he had no intention of prosecuting Glenn Greenwald. We were sharing this material with journalistic colleagues on the New York Times in order to stimulate a debate which presidents and legislatures around the world think vital."

MPs asked how the Guardian had sent documents abroad. Rusbridger insisted this had only done so with care, and that documents had been subjected to military-grade encryption in case they were intercepted – but that hadn't happened.

He then compared the focus on the Guardian with the complete lack of scrutiny about how Snowden had managed to copy 58,000 secret documents – and why 850,000 other analysts had access to the same material.

Rusbridger: "We have spent 10 minutes in this committee discussing leaks that didn't happen. The catastrophic leak that did happen was dealt with by the intelligence and security committee with the following exchange.

'Chairman: "Can we assume you are having discussions with your American colleagues about the hundreds of thousands of people who appear to have access to your information?"

Head of MI5: "All three of us are involved in those discussions."

Chairman: "Thank you very much."'

"That is the only question that has been asked in parliament about the loss of 58,000 documents through a data-sharing scheme between GCHQ and the NSA. If that amounts to oversight … the budget for oversight is £1.3m, which is about one third of the amount that Cheltenham borough council spends on car parks."

Patriotism

In perhaps the most unexpected exchange of the session, Vaz asked Rusbridger if he loved his country – an apparent reference to critics of the Guardian who have accused it of weakening its security. Vaz asked : "You and I were both born outside this country, but I love this country. Do you love this country?"

Rusbridger: "I'm slightly surprised to be asked the question but, yes, we are patriots and one of the things we are patriotic about is the nature of democracy, the nature of a free press and the fact that one can, in this country, discuss and report these things."

Vaz: "So the reason why you've done this has not been to damage the country, it is to help the country understand what is going on as far as surveillance is concerned?"

Rusbridger: "I think there are countries, and they're not generally democracies, where the press are not free to write about these things, and where the security services do tell editors what to write, and where politicians do censor newspapers. That's not the country that we live in, in Britain, that's not the country that America is and it's one of the things I love about this country – is that we have that freedom to write, and report, and to think."