Daniel Khalife’s audacious escape from HMP Wandsworth in 2023 revealed significant problems with the prison system.

But when the 23-year-old’s trial for spying charges began in October, a running theme of embarrassment in the way he was handled by the Army, police and British security services was also exposed.

Here, the PA news agency looks at the security shortcomings in the military which emerged during the trial, as well as the blunders which allowed the spy to avoid detection and escape from prison.

Khalife was never told he was doing anything wrong by using WhatsApp (Elizabeth Cook/PA)

In September 2018, two weeks before his 17th birthday, Khalife joined the British Army, completing his basic military training before joining the Royal Corps of Signals, a specialist unit which provides communications, IT and cyber support to the army.

The soldier completed his year-long specialist training in early 2020, and was posted to the 16th Signal Regiment in Stafford.

Improper use of WhatsApp was “rife”, defence barrister Gul Nawaz Hussain KC told the trial at Woolwich Crown Court.

Soldiers, including Khalife’s superiors, sent training manuals, door codes and even photos of their secure computer screens using personal phones, from secure areas.

Khalife was a member of a group chat called “Fabulous Falcon F***tards” – a reference to the Army’s Falcon communications system on which they worked.

The signaller was never told he was doing anything wrong by using WhatsApp.

Signs on the door of a secure area at Khalife’s barracks (Metropolitan Police/PA)

Giving evidence, a senior army intelligence officer named only as Soldier A, said the messaging service is not considered a safe form of communication by the military.

An experienced Army IT expert agreed, and told jurors it was troubling to hear that sensitive information had been sent on WhatsApp.

The trial was shown a Ministry of Defence directive telling soldiers not to use WhatsApp for any “official business”, but nobody within Khalife’s unit was ever disciplined over the problem.

In June 2021, an internal spreadsheet of soldier promotions was sent to a group chat called Brew Room Boys, of which Khalife was a member.

He took details from the spreadsheet before logging on to an internal HR system for booking leave, to try to find out the soldiers’ first names.

The list of soldiers, including some serving in the Special Air Service and Special Boat Service, was sent out by mistake and was also leaked to the press.

“Leaks aren’t all that uncommon in the military,” Mr Hussain said.

Barrister Naz Hussain KC said Khalife had exposed a running theme of embarrassment (Dominic Lipinski/PA)

In November 2021, Khalife made an anonymous call to the MI5 public reporting line, confessing to being in contact with Iran for more than two years.

He offered to help the British security services, and said he wanted to return to his normal life.

If Khalife had not contacted MI5 to tell them about his contact with Iran, neither they nor the police would ever have known, his barrister told the court.

The signaller sent an email to MI6 as early as August 2019 about his scheme, but never received a response.

MI5 made nine attempts to return his calls, but were not able to reach him.

The security agency reported him the following month, and he was arrested in January 2022.

Police were not aware of his activities before MI5’s approach.

In January 2023, having been bailed by police, Khalife fled his barracks.

(PA Graphics)

Before being caught, he spent three weeks living in a stolen van just five miles away from the barracks, but the vehicle, which contained important evidence, would not be found by police for another eight months.

A national manhunt was launched for the former soldier when he managed to escape from HMP Wandsworth in September 2023.

Five days before his successful escape, he attached a sling to the underside of a lorry made from kitchen trousers and carabiners.

The driver of the Mercedes truck involved, Balazs Werner, said he noticed “both kitchen doors were open” during his delivery to the site on the day of the escape, which he thought was “unusual”.

As he was leaving the prison, two guards checked the vehicle with a “torch and mirror”, and told him someone was missing from the prison.

When the guards said he could drive off, he was surprised the prison was not in lockdown, and said “are you sure?” but was allowed to drive out through the prison gates.

The sling under the truck used in the prison escape (Metropolitan Police/PA)

In a report published earlier this year, HMP Wandsworth’s Independent Monitoring Board (IMB), made up of volunteers tasked by ministers with scrutinising conditions in custody, said an audit found a raft of security failings at the jail in the wake of the escape.

The IMB said the incident led to multiple reviews and action, including “previously unavailable funding” being found for security improvements and “significant investment”, in a bid to stop “illicit items” being taken into the prison.

The security audit was carried out in November, while an internal review completed in December made 39 recommendations, according to the report.

The Ministry of Justice (MoJ) is yet to publish those documents, outline their findings or confirm whether any disciplinary action against staff at the prison has been taken.