An Uber driver has been found not guilty of a terror charge after he injured police officers arresting him outside London’s Buckingham Palace while he was armed with a Samurai sword, AFP reports.

Mohiussunnath Chowdhury, 27, was unanimously acquitted by jurors at England's Old Bailey central criminal court in London of one charge of preparing acts of terrorism, following a retrial, according to the report.

The ruling came down on Wednesday.

Two unarmed officers had suffered cuts to their hands when they tried to disarm him near Queen Elizabeth II's famous London residence in August 2017.

They feared for their lives during the confrontation as Chowdhury repeatedly shouted "Allahu Akbar".

The court also heard he supported terrorism by the Islamic State (ISIS) group, and had sent a suicide note to his sister "expressing hate of the queen and her soldiers".

But during his trial Chowdhury, from the town of Luton, north of London, reportedly told jurors he only wanted to be killed by police and had no intention to hurt anyone himself.

After the not guilty verdict was read out, he saluted the jurors who had spent 11 hours and 36 minutes considering his fate, according to AFP.

The incident at Buckingham Palace came at a time when Britain had been targeted by several terrorist attacks.

In June of 2017, three terrorists drove into passengers with a van on the London Bridge, then proceeded to stab people at the nearby Borough Market, where they were eliminated by security forces.

In April of that year, a terrorist was arrested near Parliament before he was able to carry out an attack.

Earlier this year, a 29-year-old British citizen originally from Sudan rammed his car into several people before crashing outside Britain's Parliament, injuring three.