A knife-wielding man stabbed two female police officers Tuesday in the Belgian city of Liege, stole their weapons and shot them and a bystander dead in an attack that prosecutors fear could be terror-related.

The attacker, who was later killed by police, was an inmate who had been granted a few hours release Monday but failed to return to prison, officials said. It wasn't immediately clear why he was imprisoned, but media reports say that he's a known drug offender.

Liege prosecutors' spokesman Philippe Dulieu said the man approached two police officers from behind carrying a knife and stabbed them several times.

"He then took their weapons. He used the weapons on the officers, who died," Dulieu told reporters.

Dulieu said the attacker then shot dead a 22-year-old man in a vehicle that was just leaving a parking place outside a nearby high school. The attacker then took a woman hostage inside the school.

"Liege police intervened. He came out firing at police, wounding a number of them, notably in the legs. He was shot dead," the spokesman said.

A senior official at the federal prosecutor's office told The Associated Press that "there are indications it could be a terror attack."

Despite this, Belgium's crisis center said it saw no reason to raise the country's terror threat alert for now.

When asked about the report that the attack was terror-related, Liege city hall Michel Firket told the AP: "I know nothing formal about that. The police is doing its investigation. There are no formal conclusions."

A spokeswoman for the city mayor's office, Laurence Comminette, told the AP that the children at the school were all safe.

Prime Minister Charles Michel said only that "there was a serious incident." He later met with Liege city officials.

Yves Stevens of Belgium's federal crisis center said that security in Liege is now under control, and that there was no reason yet to raise the national terror threat level.

"There is absolutely no confirmation yet that the incident is terror-related," Stevens told the AP.

Video posted on Twitter by a person claiming to be a witness showed people running in the area. About six gunshots could be heard.

Belgian police and military have been on alert since suicide bombers killed 32 people at the Brussels airport and subway system in 2016.

It's not the first time Liege has been hit by a similarly violent attack. In December 2011, a man with a history of weapons and drug offenses left home with hand grenades and guns before he lobbed the grenades into a square filled with Christmas shoppers and fired on those who escaped. Five were killed, including the assailant.