Image copyright Julia Quenzler Image caption Naa'imur Zakariyah Rahman and Mohammad Imran are both on trial at the Old Bailey

An Islamic State fanatic plotted to kill Theresa May in a suicide attack, "by blade and explosion", on Downing Street, a court has been told.

Naa'imur Zakariyah Rahman, 20, from London, has gone on trial accused of two terror charges, which he denies.

The court heard his plan to inflict "lethal violence" was uncovered by an MI5 agent, who posed as an IS official and chatted to him on a messaging app.

The court heard he said in one chat the Manchester Arena bomber "did well".

The trial at London's Old Bailey was also told that Mr Rahman believed he was "just days away" from the attack before he was arrested in November last year.

Mr Rahman, of Finchley, north London, is charged with preparing terrorist acts by conducting reconnaissance, recording a pledge of allegiance, and delivering a rucksack and jacket to be fitted with explosives.

He is also charged with helping a second defendant, Mohammad Aqib Imran, 22, to join IS in Syria by recording a sponsorship video. Mr Rahman denies both counts.

Mr Imran, of Sparkbrook, Birmingham, has pleaded not guilty to preparing terrorist acts and possessing a document on his Kindle entitled How To Survive In The West - A Mujahid's Guide 2015.

'Everyone would be dead'

On the opening day of his trial, the jury was told how Mr Rahman was originally snared in September last year, during a Telegram chat with an MI5 operative, who was pretending to be a man called Amir in Syria.

Mr Rahman allegedly asked "Amir": "Can you put me in a sleeper cell ASAP?"

The court heard how Mr Rahman told the agent that he was being investigated because of his uncle. Mr Rahman's uncle joined IS in Syria and encouraged his nephew to attack Britain before being killed in a drone strike in Syria, the prosecutors said.

Jurors were told that Mr Rahman, when asked for more information in the Telegram chat, told the agent: "I want to do a suicide bomb on Parliament. I want to attempt to kill Theresa May."

In another exchange the following day, Mr Rahman allegedly said: "My objective is to take out my target. Nothing less than the death of the leaders of Parliament."

The court heard how he also praised the Manchester Arena bomber and said he had thought about wearing "a vest" while driving past Parliament before "pushing the button" to "clear the entire block".

Mr Rahman allegedly added: "Everyone inside, including the Prime Minister, would be dead."

Prosecutor Mark Heywood told the court: "His settled conclusion was that lethal violence here, directed at the very heart of the United Kingdom government, was the only effective way to pursue his intentions.

"Before his arrest prevented it, he was, he believed, just days away from his objective, which was no less than a suicide attack, by blade and explosion, on Downing Street and, if he could, upon the Prime Minister Theresa May herself."

'Warped ideology'

Mr Heywood, prosecuting, claimed how both defendants - Mr Rahman and Mr Imran - knew each other well and shared the "warped ideology" of IS.

He said: "The evidence shows in detail [Mr Rahman's] developing fervour as he first assembled his plan, carried out reconnaissance and perfected his ideas and then acquired the means to execute it.

"At the last he took back his own coat and his own rucksack both modified with improvised explosive devices, so that he could achieve his settled aim of a full-frontal assault on the gates and then the door of Number 10.

"In this he expected to die. But he also hoped for personal reward beyond death and, in doing so, to cause death and great fear in a place and to people symbolic of the country itself."