The prosecutor said a man attacked the two officers from behind with a knife, took one of their guns and shot them both dead. He also shot dead a young man who was in a car parked nearby, before taking refuge in a school where he was killed in a subsequent gunfight, during which several other police were wounded.
Belgium has been on high alert since a Brussels-based Islamic State cell was involved in attacks on Paris in 2015 that killed 130 people, and Brussels in 2016 in which 32 died.