An Uber driver sharpened a "cool" Lord Of The Rings sword so police would not laugh when he produced it at Buckingham Palace, a court has heard.
Mohiussunnath Chowdhury, 27, is accused of plotting a terror attack on police outside the Queen's London residence in August last year.
Two officers suffered cuts to their hands as they struggled to disarm the defendant after he crashed his car into traffic cones.
Giving evidence at the Old Bailey, Chowdhury said he was moved to act after seeing on the news that a wedding party in Yemen had been targeted by Saudi Arabia, using British weapons.
He said: "I did not feel like there was anything I could do. I had feelings of self harm, like I should die. I'm responsible for these criminal acts.
"I thought the best way to die was to show a weapon to armed police or a soldier. So I assumed if I showed a weapon that they would shoot me dead. To my knowledge that's the protocol."
Chowdhury had bought the 42in long blade in 2013 as an "ornament" because he was interested in Japanese animation and he thought a sword like those seen in Lord Of The Rings would be "pretty cool".
He told jurors he bought a £5 sharpener in Sainsbury's on the day of the alleged attack because he wanted to make it "shiny".
He said: "I was thinking, are these guys going to take me seriously? Are these guys going to laugh at me? I'm having paranoid thoughts.
"I thought if I sharpened the edge, make it shiny, as soon as they see it they will know it's real and not a fake sword."
Chowdhury went home to sharpen the blade and write his sister a suicide note, the court heard.
His barrister Gulam Ahmed asked if he was telling her that he was going to attack a police officer or soldier.
Chowdhury replied: "What I mean by this is I'm going to die - face them, show them my weapon and get shot. This is what I'm thinking."
The defendant first headed to Windsor Castle then went on to Buckingham Palace thinking there were bound to be police officers with guns there, the court heard.
Chowdhury, of Kirkwood Road, Luton, Bedfordshire, denies preparing acts of terrorism on August 25 last year.