(CNN) Belgian authorities are investigating the killing of two policewomen and a passerby in the eastern city of Liege on Tuesday as a terror attack, the country's prosecutor said.

Belgian media, including CNN affiliate RTBF , are naming the gunman as Benjamin Herman. A spokesperson for the Brussels prosecutor told CNN the attacker, who was shot dead by police, was 31 years old and had the initials B.H. but declined to provide the full name.

RTBF reported that Herman was let out of prison on temporary release on Monday. He had been serving time on drug offenses. It said he may have been radicalized while in jail.

The incident occurred around 10:30 a.m., when the assailant stabbed two policewomen from behind before stealing their service weapons and using them on the officers, Liege Prosecutor Philippe Dulieu said at a news conference on Tuesday.

After killing the two officers, the attacker continued walking through the street and opened fire on a parked vehicle, fatally wounding the driver inside, Dulieu said.

Read More