A man cleared over a sword attack on police outside Buckingham Palace bragged to undercover officers that he had deceived the jury as he plotted a series of deadly terror attacks just two years later, a court has heard.

Prosecutor Duncan Atkinson QC said that Mohiussunnath Chowdhury, 28, was "motivated by dreams of martyrdom for the cause of Islam, and inspired by preachers of hate" like former al-Qaeda spokesman Anwar Al-Awlaki.

Mr Atkinson told a jury at London's Woolwich Crown Court that Chowdhury had been found not guilty at the Old Bailey of a terror charge after attacking police officers with a sword outside Buckingham Palace in August 2017.

In that incident, two unarmed officers suffered cuts to their hands when they fought to disarm him near the Queen's London residence as Chowdhury shouted repeatedly "Allahu Akbar" (God is the greatest).

After he was cleared at the Old Bailey, Chowdhury was driven by "dreams of martyrdom" and by 2019 was planning to kill members of the public at busy tourist hotspots such as London's Madam Tussauds and the Gay Pride parade while his sister did nothing to stop him, according to Mr Atkinson.

But Chowdhury was unwittingly confiding his plans to undercover police officers who had him under surveillance, the court heard.

Mr Atkinson said: "Believing them to be as sincerely committed as he was, he told them of his devotion to the cause of violent Islamic extremism, the basis for this devotion and the skewed religious beliefs that underpinned it."

Mr Atkinson added: "Various potential targets were discussed between the defendant and those he believed to be committed to the same cause and the same forms of violence as himself.

"The targets mentioned included Madame Tussauds in London, the Gay Pride parade and an attack on tourists on a London open-top tour bus.

"The object was to unleash death and suffering on non-Muslim members of the public who happened to be present, using a firearm, sword and even a van as part of an attack."

Mr Atkinson said Chowdhury even bragged that he had deceived the jury which cleared him at his previous trial.

The prosecutor told jurors they could consider Chowdhury's "assertions" to the undercover officers that he was "indeed trying to carry out a terrorist attack in 2017 and that he had deceived the earlier jury that acquitted him of it".

Mr Atkinson added: "Whatever the position in 2017, he was unquestionably preparing for terrorism in 2019."

Mr Atkinson said Chowdhury's sister Sneha Chowdhury, 25, had "better reason than anyone" to understand what her brother was thinking and wanting to achieve, but she did nothing to stop him.

Mohiussunnath Chowdhury, of Kirkwood Road, Luton, Bedfordshire, is charged with one count of engaging in conduct in preparation of terrorist acts, collecting information likely to be useful to a person committing or preparing an act of terrorism and of disseminating terrorist publications.

His sister, of the same address, denies two charges of failing to disclose information about acts of terrorism.

By Helen William