Naa'imur Zakariyah Rahman had been convicted of preparing acts of terrorism at the end of a trial in July after it was claimed he wanted to bomb the gates of 10 Downing Street, kill guards and then attack the British Prime Minister with a knife or a gun.
Rahman's plans were foiled as a result of a joint undercover operation by the FBI in the US and MI5 and Scotland Yard in the UK.
"I want to do a suicide bomb on Parliament. I want to attempt to kill Theresa May,” the 21-year-old told undercover intelligence officers.
"There are lorries here with big gas tankers. If a brother can drive it next to parliament I will bomb," he unsuspectingly told an MI5 undercover officer.
At the sentencing hearing on Friday, Justice Haddon-Cave sentenced him to a minimum term of 30 years behind bars.
"I am sure that at all material times Rahman believed the devices to be real and capable of causing serious harm," the judge said, paying tribute to the way the "extraordinary" case had been "robustly investigated, prepared and presented".
He said it would be "extremely reassuring for the public as to how this remarkable investigation has been conducted".
The plot was discovered after Rahman contacted an FBI agent who was posing as an ISIS official online. His trial heard how he thought he was being helped by an ISIS handler when in fact he was talking to security officials as part of a major undercover operation mounted by counter-terrorism officers from the Metropolitan Police and MI5.
Met Police Deputy Assistant Commissioner Dean Haydon said: "His intention was to go to the gates of Number 10. He was going to detonate one of the devices that would have killed police officers and members of the public.
"His intention was then to go on through the gates of Number 10, detonate potentially another device there which would get him into Number 10, then, having a knife or gun, attack the PM.
"He was expecting to die in the process and essentially commit martyrdom, detonating a bomb in central London at the heart of government.
"If he had got hold of a genuine bomb, a gun, or a knife, we would have been talking about an individual who could have killed, injured and maimed a number of individuals in Whitehall."
Rahman was arrested in London in November last year, shortly after the last of a number of meetings with undercover police officers posing as terrorists, and where he had been provided with what he was told was a suicide vest and a bomb.
Rahman admitted midway through the trial to helping his friend Mohammad Aqib Imran join ISIS in Libya by recording an ISIS sponsorship video.
The court heard that Rahman had come to the attention of British police in August last year when he was arrested on suspicion of sending indecent images to underage girls, but was never charged.
An examination of his mobile phone raised concerns that he may have been harbouring extremist views.
He told an undercover officer: "(God willing) will be very big if I'm successful. I can't mess up. I can't get (martyrdom) if I get caught."
He later described using a suicide belt, a drone, an improvised explosive device (IED) and poison, referred to as "P" or "curry mix".
The trial heard that Rahman had been in contact with an uncle who had travelled to Syria and joined ISIS and who had encouraged his nephew to carry out attacks in Britain.
His resolve to do something hardened over time and he was “tipped over” into doing so when he heard his uncle had been killed in a drone strike, the jury heard.
The uncle, 28-year-old Musadikur Rohaman, had sent his nephew bomb-making instructions and told him to “take a gun and go into Waitrose and shoot people”.
According to prosecutors, Rahman sought to portray himself as a self-styled "liberal" Muslim to avoid drawing any attention to his extremist views.
A probation report read out by the judge in court on Friday revealed that Rahman had admitted in prison he would have carried out the attack had he been able to, which is contrary to what he said during the trial.