A man standing trial for terror offences planned to use automatic weapons to kill people, a London court has heard.

Aweys Faqey, 37, a Dutch Muslim born in Somalia, wanted to go to Syria to fight with Islamic State, but was arrested at Stansted Airport as he boarded a flight to Istanbul, where he was told to “pretend to be an infidel tourist” before slipping over the border.

Prosecutors say Faqey’s plans only came to light during another terror-related investigation, when his communications with a Kenya-based terror suspect showed up on a laptop being searched.

Abdirahman Hassan, a Kenyan currently awaiting trial in his country, allegedly told Faqey to target people in online chats over the apps Threema and Telegram, Westminster magistrates’ court was told.

“It could have been better if AK47, M16 and BKM can be found,” one message read.

Faqey, who was arrested carrying $700 in cash and four mobile phones, has a wife and five children in the Netherlands, and another wife and one child in Somalia. He has, however, been living in the UK since 2013.

The court was told that, during five days of interviews with counter-terrorism police, he consistently answered “no comment” to questions about his plans and motives.

Prosecutor Thomas Halpin said: “He has a desire to go to Syria and fight. He has got the mindset.”

Faqey was remanded in custody until his next court appearance at the Old Bailey on 9 June.