A delivery driver discussed killing the former prime minister David Cameron and the “old woman Elizabeth” before attempting to join Islamic State, a court has heard.

Somali Aweys Shikhey also allegedly talked about shooting Jewish people and launching an AK-47 attack at White Hart Lane, then home to Tottenham Hotspur football club.

The Old Bailey was told that Shikhey, 38, led a double life and dreamed of travelling to take part in violent jihad after moving to Tottenham, north London.

He tried to raise money by applying for various loans, securing £10,000 from Barclays for a “wedding”. In the spring of 2017, he borrowed more money from his boss to help him visit his two wives and children in Holland and Kenya, the court heard.

The prosecution claimed his ultimate aim before his arrest in May last year was to travel to Istanbul, and then further east from there. His terrorist mindset was allegedly revealed in encrypted chat on Threema and Telegram with a fellow Somali living in Kenya.

The prosecutor Barnaby Jameson told jurors: “The defendant displayed a violent attitude towards this country symbolised by killing the then prime minister and the Queen.”

The exchanges were revealed on Abdirahman Idris Hassan’s computer after he was arrested for alleged terrorism offences in September 2016. Jameson said the chat would never have come to light had Hassan not been detained in east Africa.

The messages, dating back to 31 May 2016, also revealed Shikhey had been thinking about travelling to take part in jihad for a year.

Hassan wrote: “May God bestow you in killing David Cameron and the old woman Elizabeth”, in apparent reference to the Queen. The defendant allegedly replied: “Amen, brother.”

Hassan went on to ask if the defendant could buy bullets and a gun in the UK and Shikhey said three or five people were needed to “carry out a bloody attack”.

He said it would be best to find AK-47s and other automatic weapons, adding: “They could have been taken to Stamford Hill and when people leave from their game ... ”

Jameson said it appeared to be a reference to White Hart Lane, then home to Tottenham Hotspur.

The lawyer said: “It’s interesting to see the reaction from Hassan. This appears to have caused him a great deal of amusement. Was this just banter or does the exchange give you a real insight into the way these two men were thinking?”

The defendant told Hassan there were “a lot of Jews” in the area of Stamford Hill in north London. Hassan talked of “smelling fuel ... like you are lighting cigarette then burn them as much as possible”. But Shikhey allegedly replied: “No brother. It is good to shoot them live.”

Shikhey, who has a Dutch passport, denies preparing terrorist acts on or before 23 May last year.