LONDON — A man who plotted a terror attack on a British military academy with a friend who later carried out a deadly stabbing rampage at a synagogue was sentenced Thursday to life in prison. Mohammad Bashir was not involved in the Manchester attack in October on Yom Kippur but the investigation into that crime led to evidence that he and the knife attacker planned similar violence at the U.K.’s Defence Academy west of London that trains British troops. His friend believed the U.K. was training Israeli Defence Forces. Bashir, 31, pleaded guilty at Manchester Crown Court to preparing an act of terrorism. He will have to serve a minimum of 17 years behind bars before any possibility of release. “Mohammad Bashir is a determined jihadist and dangerous individual who was planning an attack that could have caused devastation,” the Crown Prosecution Service said in a statement. “His actions demonstrate a deliberate and sustained commitment to violent extremism.” Police discovered the military academy plot while investigating the Oct. 2 attack by Jihad Al-Shamie, who drove his car into people gathered outside the Heaton Park Congregation Synagogue in Manchester on the holiest day in the Jewish calendar and fatally stabbed one man. Another man died after being inadvertently shot by police as he and other congregants barricaded a door to prevent Al-Shamie from entering. Three other men were hospitalized with serious injuries. Al-Shamie, 35, who had pledged allegiance to the Islamic State group, was shot dead by police. Two months before the synagogue attack, Bashir drove Al-Shamie several hours from Manchester to the defense academy at Shrivenham in Oxfordshire to scope it out. They discussed how they would enter the base, what weapons to use and how they would use a fake suicide vest. “I am sure that you and he anticipated that you would both be martyred and you intended to kill others,” Justice Bobbie Cheema-Grubb told Bashir during sentencing. “This was a viable plan to attack the Defence Academy in a broadly similar way to that in which that Al-Shamie attacked the synagogue; using handheld weapons and a dummy suicide vest to cause as much bloodshed as possible.” The attack never occurred, and prosecutors said there was no evidence Bashir played a role in the later synagogue attack. Bashir left the U.K. two days after the synagogue attack and was arrested at the Manchester airport in November when he returned from a family wedding in Pakistan. Greater Manchester Police disclosed Thursday that the messages between the two men were discovered on two phones seized from Al-Shamie during arrests earlier in 2025 for allegedly violating a court stay-away order in February and on suspicion of rape in September. The police apologized for failing to realize the evidence they had, saying it would be up to the Independent Office for Police Conduct to determine if discovering the messages sooner could have prevented the fatal attack. “It is clear that our not having reviewed the data available to us prior to the attack constitutes a missed opportunity,” Stephen Watson, Chief Constable of Greater Manchester Police, said. “I am disappointed at the prospect of adding to the distress of all of those affected by the terrible events last October. For this, I am deeply sorry.” Brian Melley, The Associated Press