Leaks concerning GCHQ by former US National Security Agency (NSA) contractor Edward Snowden have endangered UK national security and "handed the advantage to the terrorists", according to the head of MI5, Andrew Parker.
Snowden has leaked several documents that suggest that the UK's spy agency has been involved in a mass surveillance operation.
Its £1bn Tempora programme is alleged to have involved tapping and processing global internet traffic and phone calls passing over networking infrastructure located in the UK.
GCHQ has then shared this information with its opposite number in the US, the NSA, which also has its own all-encompassing surveillance programme called Prism.
Parker, who replaced Sir Jonathan Evans as head of MI5 in April, did not name Snowden, but said that it "causes enormous damage to make public the reach and limits of GCHQ techniques".
"Such information hands the advantage to the terrorists. It is the gift they need to evade us and strike at will."
Speaking at the Royal United Services Institute in London, he added that this is the reason why "we must keep secrets secret and why not doing so causes such harm".
Parker stated that details of GCHQ and other spy agencies' capabilities are the "margin of advantage" over fanatics including "several thousand Islamist extremists" who are living in the UK and "see the British people as a legitimate target".
But he rubbished suggestions that GCHQ monitors "everyone and all of their communications", claiming that this was "utter nonsense".
"In some quarters there seems to be a vague notion that we monitor everyone and all of their communications, browsing at will through people's private lives for anything that looks interesting. That is, of course, utter nonsense," he said.
However, he added that spy agencies need to be able to access the content of data - not just the metadata of terrorists' and suspected terrorists' communications in order to stop them.
"The converse to this would be to accept that terrorists should have means of communication that they can be confident are beyond the sight of MI5 or GCHQ acting with proper legal warrant," he said. "Does anyone actually believe that?"
"Being on our radar does not necessarily mean being under our microscope: the reality of intelligence work in practice is that we only focus the most intense intrusive attention on a small number of cases at any time," he added.
Parker went on to say that GCHQ's work is essential to sustain current levels of counter-terrorism. "We are facing an international threat and GCHQ provides many of the intelligence leads upon which we rely," he said.
"Retaining the capability to assess such information is intrinsic to MI5's ability to protect the country. There are choices to be made including about how and whether communications data is retained," he continued.
But he urged the public to not assume that "somehow security will anyway be sustained".
"It will not - we cannot work without tools," he said.