Leaks of secrets by Edward Snowden, the former US intelligence official, have gravely endangered national security and given terrorist groups like al-Qa’ida “the gift they need to evade us and strike at will”, the head of MI5 has warned in his first public address since taking office.

Andrew Parker, the director-general, said that the information given away by Mr Snowden - much of it to The Guardian newspaper - posed a particular threat to the work of GCHQ, the government’s communications intelligence gathering centre. “What we know about the terrorists and the details of the capabilities we use against them together represent our margin of advantage. That margin gives us the prospect of being able to detect their plots and stop them,” he stressed.

“But that margin is under attack. GCHQ intelligence has played a vital role in stopping many of the terrorist plots that MI5 and the police have tackled in the past decade. It causes enormous damage to make public the reach and limits of GCHQ techniques. Such information hands the advantage to the terrorists.” Mr Parker, who led the investigation into the 7/7 bombings, has decided to focus on this issue of leaks because he is said to believe it was one of the most crucial being faced on matters of public safety. In doing so, he has become one of the most senior officials to speak out in robust terms about the extent of the damage the government and Britain’s security and intelligence services hold has been caused by the publication of material supplied by Mr Snowden.

Download the new Independent Premium app Sharing the full story, not just the headlines

The undermining of security from the leaks comes, said Mr Parker, at a time when the terrorist threat to the UK has “become more diversified… more diffuse; more complicated; more unpredictable”. He added: “It remains the case there are several thousand Islamist extremists here who see the British people as a legitimate target”.

Jihad in Syria has become a major source of concern, Mr Parker continued. “A growing proportion of our casework now has some link to Syria, mostly concerning individuals from the UK who have travelled to fight there or have aspired to do so. Al Nusrah and other extremist Sunni groups there, aligned with al-Qa’ida, aspire to attack Western countries.”

Speaking at the Royal United Services Institute in London, Mr Parker pointed out the statistics of the threat from terrorism faced by the UK. The “plain facts”, he said, were that “from 11 September 2001 to the end of March this year, 330 people were convicted of terrorism related- offences in Britain… In the first few months of this year, there were four major trials related to terrorist plots. Since 2000, we have seen serious major acts of terrorism in this country typically once or twice a year.”

Mr Snowden, a former consultant with the CIA and NSA, claims that he disseminated vast amounts of material, believed to be 58,000 items, to expose secret mass surveillance by the state. The US and British governments dispute that leaks were in the public interest; one senior Whitehall official maintained that it amounted to “providing a handbook for terrorists on avoiding detection”.

Mr Parker insisted: “The law requires that we only collect and access information that we really need to perform our functions. In some quarters there seems to be a vague notion that we monitor everyone and all their communications, browsing at will through peoples’ private lives for anything that looks interesting. That is, of course, utter nonsense.”

Even when it came to suspects, Mr Parker said: “Knowing of an individual does not equate to knowing everything about them. 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.”

The UK “has one of the most developed and effective set of counter-terrorist capabilities and arrangements in the world”, Mr Parker added, and it was “not the product of some clever consultant on a management away-day with a marker pen”.

The director-general insisted that checks and balances were in place against excesses by the security service and also stressed the need to ensure there is no political interference. “The idea we either can or would want to operate intensive scrutiny of thousands is fanciful. This is not East Germany, or North Korea and thank goodness for that”, said Mr Parker. “ It is critically important to the sort of country we all want to live that organisations like this do not have free rein and equally that we are not politically directed. I am in charge of operations, but [I] am accountable to the Home Secretary. She in turn is accountable to Parliament and the British people.”