LONDON (AP) — 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 Defense Academy west of London that trains British troops. His friend believed the U.K. was training Israeli Defense Forces.