LIEGE, Belgium: A knife-wielding prison inmate on a 48-hour leave stabbed two police officers Tuesday in the Belgian city of Liege, seized their service weapons and shot them and a bystander to death before being mowed down by a group of officers, setting off a major terror investigation into the country’s most savage assault since 2016 suicide attacks.

Prime Minister Charles Michel acknowledged the assailant, who had a lengthy criminal record that included theft, assault and drug offenses, had appeared in three reports on radicalism but was still allowed to take a leave from prison.

“Is our system working when we see that these kind of people are running free?” asked vice premier Alexander De Croo, echoing the thoughts of many in a nation where armed police and gun-toting soldiers still patrol the streets in the wake of the March 2016 attacks that left 32 people dead at the Brussels airport and subway system.

Tuesday’s attack happened outside a cafe in the eastern city of Liege when the assailant crept up on the two female officers from behind and stabbed them repeatedly.

“He then took their weapons. He used the weapons on the officers, who died,” the Liege prosecutor’s spokesman, Philippe Dulieu, said.

Dulieu said the attacker then shot and killed a 22-year-old teacher in a vehicle that was leaving a parking lot outside a nearby high school. He then took two women hostage inside the school before confronting police massed outside.

“He came out firing at police, wounding a number of them, notably in the legs. He was shot dead,” the spokesman said, adding that the hostages escaped unharmed.

Justice Minister Koen Geens described the assailant as a repeat offender who had been incarcerated since 2003 and was due for release in two years.

Police Chief Christian Beaupere said “the goal of the attacker was to target the police.” He identified the slain officers as 45-year-old Lucile Garcia and 53-year-old Soraya Belkacemi. He said Belkacemi was the mother of 13-year-old twin daughters who earlier lost their father, also a police officer. Four other officers were wounded in the attack, one seriously with a severed femoral artery.

Belgian media identified the suspect as Benjamin Herman, a Belgian national born in 1982, though in keeping with standard procedure, authorities declined to confirm his identity.

Interior Minister Jan Jambon said authorities were also investigating the suspected killing on Monday of an old acquaintance of the assailant and said there could be a link.

Asked about a video from close to the scene in which someone appeared to be shouting “Allahu Akbar!” (God is great) in the din, Jambon said: “My reaction is that in many terror acts, it is the last thing they shout.”