A man allegedly caught with a samurai sword outside Buckingham Palace said the Queen was the enemy "that Allah tells us to fight", a court has heard.
Mohiussunnath Chowdhury, 27, from Luton, denies preparing acts of terrorism on 25 August last year, claiming he only wanted to get killed. He shouted "Allahu Akbar" ("God is the greatest") as he was arrested, jurors at London's Old Bailey were told.
In a suicide note, he allegedly said the Queen will "be in the hellfire".
The court also heard how a potential sat-nav error led the defendant to a pub called the Windsor Castle, instead of one of the Queen's residences, earlier on the evening of his arrest.
Uber driver Mr Chowdhury, of Kirkwood Road, Luton, had searched the internet for Islamic State group beheadings and Jihadi John, jurors were told.
On the day of his arrest, Mr Chowdhury sent a suicide note to his sister and changed his social media profile picture to a green bird, in reference to becoming a martyr, jurors were told.
The trial continues.

