Thousands of people participated in the anti-immigration demonstrations, or counter-protested in opposition.