A man killed two policewomen and a bystander in the Belgian city of Liege on Tuesday before being shot dead in a gunbattle at a school in what prosecutors are treating as a terrorist attack.