Demonstrators hurled petrol bombs and fireworks at government buildings as police blasted water cannons to regain control.