A jihadist who was acquitted in 2018 of terrorism after attacking a police officer with a sword outside of Buckingham Palace while yelling “Allah hu Akbar” has been jailed for a terror plot to attack London’s gay pride festival.

Mohiussunnath Chowdhury, 28, from Luton, was found guilty in February on plotting deadly terror attacks on London landmarks including Madam Tussauds, an iconic open-top double-decker sightseeing bus, and the gay pride festival.

The former Uber driver was sentenced on Thursday to ‘life’ imprisonment with a minimum term of 25 years in jail, according to The Guardian.

The court had heard that Chowdhury had practised beheading techniques, as well as stabbing methods, and attended a firing range with the intention of obtaining a firearm in preparation for the multi-location terror attack.

Chowdhury had been acquitted of terrorism in 2018, after he had been arrested outside of Buckingham Palace, swinging a samurai sword whilst yelling: “Allah hu Akbar!”

The Islamist had driven his car at police officers guarding Queen Elizabeth II’s official residence, before disembarking and attempting to stab at the officers on August 25th, 2017, before being subdued.

A suicide note found by Chowdhury’s sister read: “The Queen and her soldiers will all be in the hellfire. They go to war with Muslims around the world and kill them without any mercy.

“They are the enemies that Allah tells us to fight.”

The 2018 court also heard that he had expressed support for Islamic State.

The Islamist’s lawyer managed to get him acquitted, however, by convincing the jury that his client did not want to murder anyone but simply wanted to be killed by police officers, otherwise known as ‘suicide by cop’.

However, The Guardian reports that a week after his acquittal and release in 2018, he had posted online of the virtues of martyrdom, and shared a picture of the policeman who subdued him, calling him a “cuck”.

It was these social media posts that triggered an undercover sting operation by counterterrorism.

Befriending four undercover officers pretending to be Islamic extremists, he told them how he had fooled the jury, but that his true intention was to “whack” a soldier at the palace.

“I told them why I did it. I told them that they are filth, even in their own courts and yet after all that, every single person on the jury, Allah made them say not guilty, yeah, this is the imaan [faith], right,” Chowdhury told an undercover agent, according to Sky News.

The convicted terrorist had told one undercover officer that he would attack one million non-Muslims for “the pleasure of Allah”.

It was after Chowdhury told them of his plans to cause mass injury and death using a vehicle, knives, or a gun, that he was arrested three days for before the beginning of the gay pride parade in London in July 2019.