Khairi Saadallah, who previously committed numerous violent and criminal offences in the UK, was refused asylum and notified by the Home Office a day before he was freed from prison in June that he would be deported.
He carried out the attack in Forbury Gardens a little over two weeks later, stabbing six people in under a minute while shouting “Allahu akbar.”
The 26-year-old has admitted murdering three victims whom he stabbed to death as they socialised in the park on 20 June.
He has denied having a terrorist motivation, but on the first day of his sentencing hearing, prosecutors laid out evidence of “extremist Islamist ideology” and said he should be given a whole-life order.
“The defendant believed that in carrying out this attack he was acting in pursuit of his extremist ideology – an ideology that he appears to have held for some time,” said prosecutor Alison Morgan QC.
“In short, he believed that in killing as many people as possible that day he was performing an act of religious jihad.”
The court heard that Saadallah had fought during the Libyan civil war for a group called Ansar al-Sharia, which was later banned as a terrorist organisation by Britain and other nations.
But when he travelled to the UK in 2012, he told Home Office officials that he was not involved in fighting and had been “helping wounded people” and making deliveries.
Saadallah claimed he had fled Ansar al-Sharia after being told to torture loyalists to the former regime, making feared reprisals over his alleged refusal the basis of his asylum claim.
Ms Morgan said photos recovered from Saadallah’s electronic devices proved his account to be false, showing him holding guns and wearing military fatigues.
One photo shows a handgun next to bullets arranged into a letter K, for Khairi, and several show him posing by statues and landmarks.
“That activity must have taken place in 2011 while he was in Libya, but his accessing of these images on Facebook in 2017 and 2018 indicate that he must have remained interested in himself behaving in this way, when he was here in the UK,” Ms Morgan said.
Following the Reading attack, Saadallah admitted to a psychologist that he had fought for Ansar al-Sharia for eight months, and claimed to have been trained by French soldiers.
The court heard that he was refused asylum in December 2012 and had an appeal dismissed in February 2013, then agreed to be voluntarily removed from the UK.
But Saadallah stopped complying the following year, as he amassed a long list of criminal convictions for theft, assault, racially or religiously aggravated harassment, and assaulting police officers.
He was receiving mental health treatment during this period and had been using alcohol and cannabis.
The court heard that he served several sentences in a young offenders’ institution and prisons including HMP Bullingdon, where he associated with hate preacher Omar Brooks, who was serving a terror sentence.
Saadallah’s electronic devices also showed records of searches for videos on the Isis executioner Mohammed Emwazi, known as Jihadi John, as well as Salafi-jihadi material and material from war zones.
He was initially granted leave to remain in the UK until 2023, but was warned in 2019 that deportation would be considered if he committed further crimes.
On 4 June, while serving his sentence in HMP Bullingdon for further convictions, he was notified that the home secretary had determined that his deportation would be for the “public good”.
But a letter said that no steps could be taken at that time, because the ongoing Libyan civil war meant he could not be returned to the country.
Saadallah was released from prison the following day, subject to licence conditions, including attending treatment for mental health and alcohol issues.
The court heard that over the following days, Saadallah carried out internet searches about “black magic” and looked at images of the Libyan civil war and weapons.
On 16 June – five days before the attack – he carried out hostile reconnaissance in Forbury Gardens.
Two days later, a probation officer raised concerns about his mental state, but when a crisis team went to Saadallah’s home on 19 June he did not answer the door.
On the same day, he purchased his murder weapon – a large kitchen knife – from a supermarket and ignored calls from probation and mental health services.
Police officers went to his home after his brother raised the alarm, but footage from a body-worn camera showed him dismissing concerns about his wellbeing and being calm and polite.
On the day of the attack, CCTV footage showed him travelling into central Reading by bus then dumping a rucksack, attempting to destroy his mobile phone and concealing the knife in his shorts outside Forbury Gardens.
The court was played footage of the attack, which was partially obscured by trees but showed Saadallah running at speed towards his victims and stabbing them from behind within seconds.
“The prosecution alleges that what took place was ruthless and lethal,” Ms Morgan said. “In short, he executed Joseph Ritchie-Bennett, David Wails and James Furlong and it was done with such speed and precision, before they had time to even be aware of what was happening, less still to be able to react to defend themselves.”
The prosecutor said Saadallah stabbed the three victims “with great force and precision to their neck or upper back area”, in a way designed to kill.
He stabbed Stephen Young, who survived, then moved on to the second group, where he stabbed Patrick Edwards and Nishit Nisudan, who also survived.
Distressing witness statements read to the court described how the attack happened too quickly to realise what was taking place, and some people thought Saadallah was just “messing around”.
The court heard that he tapped his first victims on the shoulder before attacking them from behind, in what one witness compared to a game of “duck, duck, goose”.
Mr Justice Sweeney will decide whether the attack was committed for a religious, political or ideological cause, and to what degree Saadallah's mental state influenced his actions. The sentencing hearing continues.