The head of MI5 has warned that terrorist plotting against Britain is at its most intense for three decades and still growing as he backed new powers to monitor communications.
Andrew Parker said new technologies were posing ever-greater challenges to his agency as he argued that internet firms such as Facebook and Twitter had a "responsibility" to share information.
But he stressed that MI5 was not interested in "browsing through the private lives" of the general public and should work within a "transparent" legal framework.
Giving the first live broadcast interview by any security service chief on BBC Radio 4's Today programme, Mr Parker played down fears about extremists entering Europe among the stream of refugees from Syria.
He said the police and security services had intervened to foil six terrorist plots in the UK over the past 12 months and the threat was growing.
"That is the highest number I can recall in my 32-year career, certainly the highest number since 9/11," he said. "It represents a threat which is continuing to grow, largely because of the situation in Syria and how that affects our security."
Mr Parker said the "shape" of the threat was changing dramatically.
"They are using secure apps and internet communication to try to broadcast their message and incite and direct terrorism amongst people who live here who are prepared to listen to their message," he said.
The MI5 chief said the agency was focused on monitoring "where terrorists may be and how they are moving".
He added: "As far as the flow of migrants and refugees go, of course it is something we are aware of. It is not actually, as we speak today, the main focus of where the threat is coming from."
Mr Parker set out the challenges facing the security services as the Government prepares for a battle over legislation dubbed the "snooper's charter". The Investigatory Powers Bill would oblige UK internet service providers to keep data on their customers and make the information available to authorities.
Mr Parker said: "Because of that threat we face and the way the terrorists operate and the way we all live our lives today, it is necessary that if we are to find and stop the people who mean us harm, MI5 and others need to be able to navigate the internet to find terrorist communication.
"We need to be able to use data sets so we can join the dots, to be able to find and stop the terrorists who mean us harm before they are able to bring the plots to fruition. We have been pretty successful at that over recent years, but it is becoming more difficult to do it as technology changes faster and faster."
He reassured people that MI5 was not interested in their private lives.
"The important thing to say is that we focus on the people who mean us harm. We are not about browsing through the private lives of citizens of this country," Mr Parker said.
"We do not have population-scale monitoring or anything like that."
Mr Parker insisted he did not "have a view" on specific measures such as whether ministers or judges should authorise interception of communications, insisting it was "not for me to say what should or should not be in that Bill".
But he said it was important the law was updated so it was "modern and transparent" and "describes as straightforwardly as it can what MI5 does these days".
Mr Parker insisted internet companies had a "responsibility" to come forward with information about potential threats. Even where the security services knew the identity of a suspect and had a warrant to obtain their communications signed by the Home Secretary, there was still a question of "can we obtain those communications from that company?".
"It is in nobody's interests that terrorists should be able to plot and communicate out of the reach of any authorities with proper legal power," he said.
Mr Parker also suggested there needed to be "international agreement and arrangements whereby companies have a confident basis on which to co-operate with agencies like mine and with the police in order to protect society and their customers".
Asked about concerns that firms could be forced to share data with states like Russia and China, Mr Parker said: "Britain stands for high standards in these things. We operate only under law, we have independent oversight and we have very, very strict principles of necessity - we only do what we really need to do; proportionality - we only do it at the scale that is absolutely necessary.
"I think it is possible to think of international agreements based on those high standards and principles."
The MI5 head also referred to heavy criticism of Facebook over its failure to disclose a key conversation involving one of Fusilier Lee Rigby's killers.
"In that case, the Intelligence and Security Committee (ISC) concluded that had that happened it might have made a material difference to the outcome," he said.
"There is a real question here about responsibility for those who carry this information.
"Some of the social media companies operate arrangements for their own purposes under their codes of practice, which cause them to close accounts sometimes because of what is carried.
"I think there is then a question about why not come forward? If there is something that concerns terrorism, or child sex exploitation, or concerns some other appalling area of crime, why would the company not come forward?
"That was the question the ISC was raising."
Asked why the security services failed to prevent the killing of Fusilier Rigby or anticipate the actions of the extremist murderer known as Jihadi John, Mr Parker said officials had to make "choices".
"There cannot be a guarantee that we can find and stop everything ... that would be impossible," he said.
Mr Parker dismissed the idea that the way MI5 worked was radicalising people, or that its strategy was failing.
"I don't think we are doing things wrong, I just think we need to keep on doing what we are doing and do more," he said.
In a statement released after the interview, Mr Parker said that alongside the six plots thwarted in the UK, intelligence had disrupted a further nine attack plots overseas.
He said MI5 had seen people "radicalised to the point of violence within weeks" by the internet.