Mohiussunnath Chowdhury (pictured in a court sketch) said most of what he told the officers was 'prison banter'

An alleged jihadist has told a jury his boasts about committing a terrorist attack to undercover police officers was just 'bravado' to try to 'fit in'.

Mohiussunnath Chowdhury said most of what he told the officers, who he believed were 'good Muslims', was 'exaggeration' and 'prison banter', Woolwich Crown Court heard.

Giving evidence today, the 28-year-old said he wanted to 'impress' new friends following his release from custody after being cleared of terrorism over an attack on two police officers with a sword outside Buckingham Palace in August 2017.

But he insisted he always steered the conversation away from actually committing any acts of terrorism, saying that got 'too real' for him.

'I wanted that validation, that acceptance. But I didn't want to actually do anything,' he said.

Prosecutors allege Chowdhury was planning to kill members of the public at busy tourist hotspots including London's Madame Tussauds and the Gay Pride parade last year but was unwittingly confiding in undercover officers who had him under surveillance.

He even bragged about deceiving the jury which cleared him in December 2018 over the sword attack outside the Queen's London residence, prosecutor Duncan Atkinson QC said earlier in the trial.

Chowdhury was cleared of launching a Samurai sword attack on police outside Buckingham Palace in London (file photo)

Chowdhury told the court a recording of him boasting to the officers about an 'iconic' terror attack on Madame Tussauds was him referring to another inmate's plot.

'I wasn't suggesting that I would attack it and they should attack it. This is a completely false allegation,' he added.

It was claimed the only reason Chowdhury joined a firearms course was because he was interested in guns as a hobby.

His barrister Simon Csoka QC asked him: 'Did you stop and think about how that might be perceived?'

'I just thought I was a free man, I shouldn't have to restrict myself,' replied Chowdhury.

Prosecutors allege Chowdhury was planning to kill members of the public at the Gay Pride parade last year (pictured)

The court heard that following his arrest he was approached in Belmarsh prison by Muslim inmates who treated him 'like a hero' and he decided to 'play along'.

He said: 'I kind of learned to talk the talk. For me, it was survival thing.'

Chowdhury said he felt 'worthless' because he lived in the UK while Muslims were being killed in the Middle East.

'I was living in this bubble when there is so much suffering going on,' he said.

Chowdhury said he became 'suicidal' in August 2017 after hearing of the bombing of a wedding in Yemen on the news and felt 'complicit' for what was happening in the region, which he felt was a result of the UK Government's actions.

He said: 'I felt I had blood on my hands at this point.'

The former Uber driver said he was trying to find 'guys with guns' but insisted he had no intention of hurting innocent people, pointing to the fact he had been had driven by crowds of innocent people.

Chowdhury said: 'They were trying to relate it to the London Bridge attacks.

A police image of the sword used during the incident outside Buckingham Palace in London. Chowdhury claimed at an Old Bailey trial he wanted to be killed by police and had no intention of hurting anyone but himself

Another photograph of the sword allegedly used in the incident at Buckingham Palace

The hilt of the sword allegedly used outside Buckingham Palace is pictured above

'Obviously I could have used my car, that was my most powerful weapon. I didn't do anything like that.'

Chowdhury said he never intended to hurt the two unarmed police officers, who suffered injuries to their hands while fighting to disarm him as he shouted 'Allahu Akbar' [God is the greatest].

He claimed at that Old Bailey trial he wanted to be killed by police and had no intention of hurting anyone but himself.

Chowdhury from Luton, Bedfordshire, denies 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 disseminating terrorist publications.

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