Advances in technology are allowing terrorists to communicate "out of the reach of authorities", Director General of MI5, the UK’s national security intelligence agency, Andrew Parker said.

The serving boss of the UK's home security agency told the Today programme it was becoming more difficult to obtain online information.

He said internet companies had an "ethical responsibility" to alert agencies to potential threats. But MI5 was not about "browsing the lives" of the public, he added.

Ministers are preparing legislation on the powers for carrying out electronic surveillance. Mr Parker, in the first live interview by a serving MI5 boss, said what should be included in new legislation was a matter "for Parliament to decide".

Mr Parker also said there have been six attempts at terrorism in this country in the last 12 months which is the highest number he can recall in his 32 year career, and the highest number since 911.

The 'flow' of migrants and refugees into Europe "is not the main focus of where the threat is coming from", he added.