A man acquitted of terrorism in 2018 after he was arrested with a metre-long samurai sword outside Buckingham Palace has been convicted of planning an attack at tourist hotspots in London.

Mohiussunnath Chowdhury, 28, from Luton, was found guilty of terrorism offences on Monday after the jury at Woolwich crown court heard he planned to kill members of the public at busy London locations including Madame Tussauds, the Pride parade and on an open-top tour bus.

In December 2018, Chowdhury was acquitted by an Old Bailey jury in relation to the 2017 attack outside the Queen’s London residence.

He had been armed with the sword and shouted “Allahu Akbar” but his lawyer successfully convinced the jury that he had been trying to get himself killed by a police officer, rather than intending to hurt anyone else.

However, a week after his release from remand in December 2018 following the acquittal, he posted online about the virtues of martyrdom and published an image of the police officer who had wrestled the sword away from him outside the Queen’s London residence, calling him a “cuck”.

Those posts prompted an undercover operation by counter-terrorism officers, which would lead to Chowdhury being convicted on Monday. Over several months, four undercover officers befriended him and the former Uber driver turned chicken shop driver shared with them his plans to use guns, knives or a vehicle to cause murder and mayhem, leading to his arrest three days before Pride, which he had discussed attacking with a vehicle.

He also bragged to them about deceiving the jury in 2018, seeming particularly proud of the ruse of shaving off his beard before going to court. He said that his intention had been to “whack” a soldier at the palace.

Video from police interviews after his arrest showed that he initially cut a nonchalant figure, telling officers that it was all a misunderstanding fuelled by misguided suspicion over his innocent interest in weightlifting and martial arts.

Commander Richard Smith, head of the Met ’s counter-terrorism command, said officers attributed Chowdhury’s relaxed demeanour at that time to the fact “he believed one of the covert officers, ‘Mikael’, was planning on carrying out an attack and we believe he may have been trying to buy time for Mikael to do so”.

However, on the day of Pride, police played him recordings of some of his conversations with undercover officers and Chowdhury’s mood changed. His head bowed, his shoulders drooped and he refused to answer further questions.

During the time he was under surveillance, Chowdhury bought a BB gun, which was a replica Glock, and tried to acquire a real firearm. He also shared a graphic execution video with undercover officers via WhatsApp.

His conversations with officers were recorded and played in court, as were those with his sister Sneha Chowdhury, 25, at the home they shared, in Luton, which had been bugged.

She had given evidence against him in his Buckingham Palace trial but after his release he told her: “I’m doing another attack,” and demonstrated to her how to stab someone, boasting about practising decapitation techniques.

After buying two wooden bokken training swords, he could be heard in one recording saying to her: “Let’s fight here for a little bit then you do the study. You attack first and then I attack first.

“This is how, how I would strike, yeah, if I was running up to a person, no someone like that, yeah, what I would do is I run up hold the blade like that and then I would stab it like that indeed.”

Cut marks consistent with such knife training were were found on a canvas wardrobe in his room, the court heard. On another occasion, he told her: “I need to practise decapitation techniques.”

Facebook Twitter Pinterest Sneha Chowdhury. Photograph: Metropolitan police/PA

His sister was charged with two counts of failing to disclose information about acts of terrorism but claimed after their arrest in July 2019 that their conversations were lighthearted. Nevertheless, the jury convicted her on one count and acquitted her on another.

Her brother was convicted 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, for having a guide to carrying out terrorist attacks on his phone, and of disseminating terrorist publications, for the execution video he shared.

He showed no emotion after hearing the jury return their verdicts following eight hours and 39 minutes of deliberations. By contrast, his sister wept in the dock.

His 2018 acquittal came despite jurors seeing a number of drawings of violent scenes found in his cell while he was on remand in Belmarsh prison, including a childlike sketch of a man with an AK-47-style rifle shooting a police officer outside Downing Street, shouting Allahu Akbar.

He had arrived at Buckingham Palace after his satnav initially sent him to a pub called the Windsor Castle. He swerved in front of a marked police van and crashed into a set of bollards, before waiting in the vehicle for police to approach.

Responding to his conviction, Smith said: “I believe Mohiussunnath Chowdhury to be an extremely dangerous individual who is committed to kill and maim members of the public for no other reason than he is possessed of a hate-filled ideology.”

In comments with added significance given the recent attacks by convicted terrorists at London Bridge, in HMP Whitemoor and in Streatham, Smith continued: “In the longer term, individuals like him need to be deradicalised and diverted from these dangerous ideologies.”