Police detonated non-lethal dispersion grenades as they fended off thousands of protesters, some armed with machetes, axes and gasoline bombs.