The terrorist threat facing the UK may not have reached its "high water mark" and powers to monitor suspects' communications are crucial to preventing atrocities, the head of MI5 has warned.
Andrew Parker, director general of the Security Service, said the "scale and tempo" of the danger is now at a level he has not seen in his 32-year career.
He said the threat posed by Islamic State - also known as Isil - "shows no sign of abating" after more than 750 British extremists travelled to Syria.
In remarks days before the publication of landmark legislation covering spies' activities in the digital era, Mr Parker stressed the importance of tools such as the capacity to mount IT attacks - known as equipment interference - against terrorist networks in order to access their communications.
Giving a speech in London, he said six attempted terrorist atrocities have been thwarted in the UK in the last year.
"It may not yet have reached the high water mark and, despite the successes we have had, we can never be confident of stopping everything," Mr Parker said, citing the Tunisia beach massacre in June as an "appalling reminder of the threat".
He spoke of a "three dimensional threat" - at home, overseas and online - with an increasing proportion of the agency's casework linked to Syria and Isil.
He said: "We are seeing plots against the UK directed by terrorists in Syria; enabled through contacts with terrorists in Syria; and inspired online by Isil's sophisticated exploitation of technology.
"It uses the full range of modern communications tools to spread its message of hate, and to inspire extremists, sometimes as young as their teens, to conduct attacks in whatever way they can."
The speed at which radicalisation can occur online and the emphasis on low sophistication but potentially deadly plots are two major challenges posed by IS, he said, while a greater ambition for "mass casualty" attacks has been observed in the last year.
Mr Parker stressed that the threats to Britain from al Qaida in South Asia, the Arabian Peninsula and parts of Africa have not disappeared.
"All of this means that the threat we are facing today is on a scale and at a tempo that I have not seen before in my career," he said.
He also used the address to highlight the need for surveillance powers to be brought in line with modern technology.
"Today the conversations of our adversaries are happening on a bewildering array of devices and digital platforms, often provided by companies based overseas," he said.
"And an increasing proportion of such communications are now beyond our reach - in particular with the growing prevalence of sophisticated encryption."
MI5 has no desire to hold back the tide of technological change, he said, but added: "Information gathered from the technology terrorists use, often in the same way as the rest of us, may sometimes be the only way to stop them.
"And so we need the tools to access terrorists' communications online just as much as we intercepted written communications and telephone calls in years gone by."
Mr Parker also repeated his message that firms have an "obligation" and an "ethical responsibility" to work with law enforcement and other agencies "to prevent their services being used for the purposes of serious crime and terrorism".
He said the ability to access and analyse data such as the who, when and where of communications, or travel and passport information, is "more important than ever before", adding: "We use data to save lives."
Mr Parker stressed that "we do not, and could not, go browsing at will through the lives of innocent people", saying: "We use these tools within a framework of strict safeguards and rigorous oversight, but without them we would not be able to keep the country safe."
Referring to the upcoming Investigatory Powers Bill, he said the service is not seeking "sweeping new intrusive powers" but rather a "modern legal framework that reflects the way that technology has moved on, and that allows us to continue to keep the country safe".