A man killed two policewomen and a bystander in the Belgian city of Liege on Tuesday before being gunned down at a school in what officials say was a terrorist attack by a radicalised "lone wolf" just out of prison.

The man was named by public broadcaster RTBF as a 36-year-old petty criminal and drug dealer who was let out on day-release just on Monday.

The attacker's profile showed up concerns about the risks of petty criminals, including those not from Muslim backgrounds, being inspired to Islamist violence while incarcerated.

Convicts have been behind several recent attacks in Europe, including some using little more weaponry than a knife or rental truck.