Meanwhile, Sir Ken warned that Iran is also expanding a hybrid campaign in the UK.

The intelligence chief said there had been 50 arrests in the last year over Iran-linked activities.

Much of this Iranian aggression has been aimed at Jewish communities, Sir Ken added, and also at “harder targets, like military sites”.

Sir Ken did not mention arrests at RAF Fairford directly, where Prime Minister Andy Burnham has said an alleged plot was “almost certainly directed by Iran’s Islamic Revolutionary Guard”.

But the MI5 head continued: “What I can say is that those who seek to cause mayhem on British streets – whether hired thugs here or their paymasters overseas – will meet an unflinching response.”

Sir Ken added that the National Security Act – a 2023 law designed to target people working against UK interests for foreign powers – is in heavy use, and has been employed to tackle threats from China as well as Iran and Russia.

On the emerging threat posed by AI, Sir Ken said: “AI is already supercharging the cybersecurity contest between attackers and defenders.

“It can produce propaganda and radicalising material tailored to the individual.

“We’ve caught terrorists seeking to exploit Al to improve their reconnaissance and attack methodologies, with Al-enabled drones adding a new twist.”

The threat he was most worried about, Sir Ken told Thames House, was extremist groups harnessing AI to make bioweapons.

He said that threat was “not yet realised” but warned the technology has the “potential to change the stakes on existing or even new bioweapons”.

Sir Ken continued: “These risks are real. The UK Intelligence Community – MI5, GCHQ, MI6 – is working closely with the UK’s globally respected AI Security Institute to take them on.”

Sir Ken said AI poses unknown threats, telling Thames House: “Put at its simplest, human history has given us no experience of facing an actor which is smarter than we are”.

In April, the UK’s terrorism threat level was raised to severe for the first time in five years, meaning an attack is highly likely.

Sir Ken said Islamist groups like Al Qaeda and so-called Islamic State both continue to direct and inspire attacks, while the increased risk was also driven “in significant part” by extreme right-wing terrorism.

He continued: “Over the last year the most marked trend has been an increase in cases where extremist versions of anti-immigration and anti-Muslim grievance are tipping into terrorist intent.”

Sir Ken said extreme right-wing terrorism tended to “skew young”, driven by the internet – adding that MI5 had in recent months investigated a “radicalised extreme right-wing 13-year-old here in the UK”.

He said: “That investigation generated insight that enabled one of our international partners to prevent a lethal attack on their soil.”