An Uber driver accused of attacking police outside Buckingham Palace armed with a Samurai sword has told jurors of his guilt over Britain's role in arming Saudi Arabia, saying: "I felt I should die."
Mohiussunnath Chowdhury, 27, allegedly shouted "Allahu Akbar" ("God is the greatest") after crashing his car near the Queen's London residence.
Two police officers suffered cuts to their hands as they wrestled to disarm Chowdhury in August last year.
After he was arrested, a suicide note to his sister was found, saying: "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."
Giving evidence, the defendant told jurors: "I've never been a violent person."
He explained how he started to pray and research Islam as part of a plan to marry a Muslim woman.
He said: "When I was driving for Uber, I came across a lot of couples and I had a desire in my heart. I wanted a nice lady for myself as well.
"I was lonely. I felt kind of depressed. I told my sister I wanted to get married. I started to pray regularly and I started to watch YouTube videos about how to become a better Muslim."
Chowdhury said he did not go to a Mosque or speak to anyone in his quest to be more religious, instead finding YouTube videos and articles on the internet.
His lawyer Gulam Ahmed asked why he searched for Islamic State beheading videos.
The defendant said: "Every other video would be about Isis. Because these had got millions of views I got curious and clicked on these videos to see what it was about.
"I was shocked about some of the stuff because they also had practices I did not agree with."
Chowdhury insisted he did not agree with IS and did not "believe in the killing of innocents".
He went on to explain how he felt "guilty" about the British government providing arms to Saudi Arabia.
He said: "I felt responsible. If I say nothing, and do not dissociate myself I'm responsible for supplying arms to the government of Saudi Arabia which is killing people indiscriminately.
"I had to shun these people and show my disapproval of their actions."
He went on: "I felt I should die. I felt all these innocent people are dying for no reason. I should love them like my brothers. It doesn't make sense to have this wonderful life here while my family is being killed and it's being done in my name."
The defendant was quizzed about WhatsApp messages in which he was challenged by a friend about his "obsession about Isis and sex slaves".
The friend said it was "not cool" and he was worried about him being radicalised, to which Chowdhury replied: "I'm already radicalised."
But the defendant told jurors: "I didn't mean it seriously."
Chowdhury was born in Uxbridge before moving with his parents and sister to Luton.
The university drop-out said he had liked skateboarding, rollerblades, martial arts, and Japanese anime.
The defendant, of Kirkwood Road, Luton, Bedfordshire, denies preparing acts of terrorism on August 25 last year.