A former British soldier accused of passing secret information to Iran considered travelling to the Middle Eastern country before deciding it would be too “dangerous”, a court has heard.

Giving evidence at Woolwich Crown Court on Thursday, Daniel Khalife said he wanted to “draw out” the Iranian intelligence officers he was in touch with and “strengthen the relationship based on lies”.

The 23-year-old told jurors he “considered potentially travelling to Iran” while still a serving soldier, but feared there could be consequences if they found out the information he was providing was “fictitious”.

“I felt this would be dangerous,” he said.

Daniel Khalife is accused of escaping from prison and charges contrary to the Official Secrets Act (PA)

When police arrested him and searched his room, they found a number of “completely fake” documents purporting to be from MPs, senior military officials and the security services, his trial heard previously.

Khalife told the court he thought up a plan to “digitise” the documents, by putting a laptop in a “fake diplomatic bag” to make it seem like it had been intercepted.

He intended to try to sell the device, jurors heard.

In August 2020 he travelled to Istanbul in Turkey, the court heard, where he was told to get a flight to Iran.

Khalife told jurors he “purposefully sabotaged the operation” by coming up with excuses as to why he could not travel any further.

The former soldier, who described himself as an “aviation nerd”, told the foreign agents he was “afraid” of flying on the old aircraft operated by Mahan Air.

Asked about a video he filmed of himself outside a hotel in Istanbul, Khalife said it was taken to prove he was actually there.

“I was not just filming outside the hotel for fun,” he said.

The Iranians still did not believe him, and “sent someone to scope me out”, he added.

Asked about the use of WhatsApp groups to share orders and even secret documents in the army, Khalife said the practice was “standard procedure”, adding that it would be “impossible” to operate without it.

The former soldier is alleged to have fled his army barracks in January 2023 when he realised he would face criminal charges over allegations he passed classified information to Iran’s intelligence service.

Later, while on remand, he is alleged to have escaped from HMP Wandsworth in September 2023 by tying himself to the underside of a food delivery truck using bedsheets.

As well as the prison escape, he also faces charges contrary to the Official Secrets Act and Terrorism Act, and is accused of perpetrating a bomb hoax.

He denies all the charges, and the trial continues.