The threat of a terror attack in the UK is increasing and the security services cannot be expected to stop every plot, the head of MI5 has warned.
Speaking after the attack on the French magazine Charlie Hebdo, Andrew Parker said police and MI5 had "stopped three UK terrorist plots" in recent months.
He said the number of Britons who have travelled to Syria was now around 600.
It comes as security has been increased on the France/UK border following the Paris attack, which left 12 dead.
UK border staff have "intensified checks on passengers, on vehicles and goods coming from France" as a precautionary measure, Home Secretary Theresa May said.
Meanwhile, a huge manhunt for the two suspected gunmen in Wednesday's deadly attack on Charlie Hebdo magazine has entered its third day.
Speaking about the threat of terrorism, Chancellor George Osborne said: "My commitment is very clear. This is the national priority. We will put the resources in. Whatever the security services want, they will get."
He told BBC Breakfast financial support had already been given in the past few weeks, with more than £100m going to the monitoring of people travelling to conflicts in Syria and Iraq.
'Cannot be complacent'
Mr Parker, speaking at MI5's headquarters, warned the UK was facing "more complex and ambitious plots" by extremists.
The shootings in Paris were "a terrible reminder of the intentions of those who wish us harm," he said.
It comes after a number of anti-terrorism operations in the UK in recent months, including three foiled plots in the last three months.
"Deaths would certainly have resulted otherwise," Mr Parker added.
"But we cannot be complacent. Although we and our partners try our utmost we know that we cannot hope to stop everything."
He stressed the UK was not facing an "unmanageable crisis" however, saying "different styles and shapes of terrorism" had been "faced down" for more than 40 years.
Mr Parker said: "The going is getting tougher but there are good reasons for confidence in our enduring ability to respond. It's well-understood that we can't guarantee to stop everything, but we continue to strive to get as near to that as we can."
Mr Parker, who was named director general of MI5 in March 2013, said the security services knew a group of al-Qaeda extremists in Syria planned "mass casualty attacks against the West".
But he said the number of "crude but potentially deadly plots" MI5 was facing had also increased.
Last month, a gunman took hostages in a Sydney cafe, resulting in two of them being killed. That followed the fatal shooting of a soldier at Ottawa's war memorial before the gunman was shot dead in the nearby Canadian parliament, in October.
Senior police officers have previously warned of a growing concern over so-called "lone-wolf" attacks in the UK.
"Such attacks are inherently harder for intelligence agencies to detect," Mr Parker said.
"They are often the work of volatile individuals, motivated by terrorist propaganda rather than working as part of sophisticated networks. They often act spontaneously or after very short periods of prior planning."
Gordon Corera, BBC security correspondent
The threat is growing, MI5 is stretched, some of its capabilities are at risk.
All of that means something is likely to happen. That was the bleak message from Andrew Parker.
It was notable that he said the threat comes not just from the self-starters, inspired by the group calling itself Islamic State, but also from groups linked to al-Qaeda still planning mass casualty attacks, including one cell in Syria.
This speech may have been planned before Paris, but events there will add to its impact on a public being told that something similar may well happen here.
'Message of hate'
A "significant proportion" of the 600 Britons now believed to have travelled to Syria have joined Islamic State (IS) militants, he added.
The government had previously estimated that 500 had travelled to fight in Syria.
Despite its "medieval tactics", IS was a "terrorist phenomenon of the modern age", he said, making "full use of the modern social media and communications methods through which many of us now live our lives".
And he warned that changes in technology were making it increasingly harder for security services to intercept communications between extremist groups.
"Wherever we lose visibility of what they are saying to each other, so our ability to understand and mitigate the threat that they pose is reduced," he said.
He went on to defend the interception of communications by the security services.
It follows criticism of GCHQ and the US National Security Agency after leaks by ex-US security contractor Edward Snowden.
Mr Parker said "almost all" of MI5's key counter-terrorism operations had involved the practice.
He went on to warn against a situation where privacy in the UK was "so absolute and sacrosanct that terrorists and others who mean us harm can confidently operate from behind those walls without fear of detection".
"My sharpest concern as director general of MI5 is the growing gap between the increasingly challenging threat and the decreasing availability of capabilities to address it," he added.
Sir Peter Fahy, vice-president of the Association of Chief Police Officers, told BBC Breakfast the threat was two-fold.
Sir Peter, also chief constable of Greater Manchester Police, said: "In the past, it was just about big plots coming in from the outside.
"Now we're just as concerned about individuals in this country being rapidly brainwashed on the internet and suddenly deciding to perform some chaotic attack. So we've got to be vigilant to both."