Naa'imur Zakariyah Rahman allegedly believed he was carrying an explosive device ready for the atrocity when he was arrested in November, but had in fact been handed a replica by a spy posing as a fellow extremist.
In conversations with the informant he knew as “Shaq”, Mr Rahman allegedly revealed his plan to bomb the gates to Downing Street and force his way past police with pepper spray.
The 20-year-old is accused of telling how he might use a guard as a human shield to enter the prime minister’s official residence and “take her head off” with a knife before being killed by security forces.
Mr Rahman allegedly believed he was in contact with senior Isis members in Syria, where his own uncle had been killed in a drone strike while fighting for the terrorist group, and recorded a pledge of allegiance to be broadcast after his death.
Prosecutor Mark Heywood QC told the Old Bailey that Mr Rahman considered the military and MI5 buildings as targets before settling on Downing Street, and was fully prepared to die.
“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,” he said.
Mr Rahman is also accused of helping his friend Mohammad Aqib Imran, 22, to join Isis in Syria by recording a sponsorship video.
Mr Heywood read the court a Telegram chat message in which Mr Rahman was allegedly snared by an MI5 agent posing as a fake Isis emir [leader].
"Can you put me in a sleeper cell ASAP?” the defendant allegedly asked in September.
"I want to do a suicide bomb on Parliament. I want to attempt to kill Theresa May…my objective is to take out my target. Nothing less than the death of the leaders of Parliament.”
The court heard Mr Rahman praised the Manchester Arena bomber, saying he “did well” by massacring 22 people including children, and voiced his excitement at the prospect of reaching paradise with “72 wives”.
In October, he allegedly met a contact known as Abu Waleed – an MI5 agent - in a London shopping centre and told him he planned to use a suicide belt, drone, improvised explosive device and poison.
The court heard that the following month “Abu Waleed” introduced Mr Rahman to another member of the network called Shaq, an undercover police officer, to help him obtain a blade and suicide vest.
Mr Rahman allegedly told him: “If you can put a belt on me, I'd actually want to do that.”
Jurors were shown covert video footage of a meeting in Shaq's car in a PC World car park in Brixton on 6 November.
Mr Rahman could be seen telling how he would get past Downing Street’s gates, make a “10-second sprint” for the door of Number 10, with his main objective to “take her head off”.
He later carried out reconnaissance around Whitehall, prosecutors said, walking past the entrance to Downing Street and the site of the Westminster attack at the gate of the Houses of Parliament in March 2017.
Mr Rahman also bought a rucksack in Argos which he gave to a spy to be fitted with explosives, it is alleged.
On 28 November, Shaq handed the defendant back his bag and jacket claiming they were both fitted with powerful explosives, as well as a replica pepper spray device, a set of plastic gloves and a blue holdall bag.
Asked if he was ready, Mr Rahman allegedly replied: “Yeah. Do you know? Now I've seen everything it feels good.”
He was stopped by police minutes later still carrying the items, allegedly telling a police officer: “I'm glad it's over. I'm glad I'm arrested.”
Mr Rahman had allegedly consumed propaganda from Isis, al-Qaeda, the Muslim Brotherhood and jihadi ideologues, meeting Mr Imran as he planned travelling to join Isis in Syria.
The pair had discussed their fear of “spies” and not being able to trust anyone, the court heard.
Mr Imran, who was arrested on the same day, had allegedly set about assembling money and acquiring a fake passport for his trip from another MI5 role-player via Telegram.
Mr Rahman, from Finchley in north London, has denied two counts of preparing terrorist acts.
Mr Imran, of Sparkbrook in Birmingham, has pleaded not guilty to preparing terrorist acts and possessing a terrorist document on his Kindle.
More about: ISIS