Flemish right-wing parties called the march, which took place near major EU institutions, amid fears the pact could lead to an increase in immigration.
Police deployed tear gas and water cannon as clashes broke out. About 5,500 protesters took part.
A counter-protest organised by left-wing groups and charities in the city centre drew about 1,000 people.
Could the migration crisis finish the EU?
Migration to Europe in charts
The largest member of Belgium’s ruling coalition, the right-wing N-VA party, left the government last Sunday in protest against the prime minister’s decision to sign the agreement.
It was signed by 164 countries in Marrakech last week, with the US and a number of European states – including Austria, Hungary, Italy, Poland and Slovakia – refusing to formally adopt the agreement.
Border-crossing girl dies in US custody
Can ‘colonial cities’ in Africa end migration to Europe?
The deal, which is not legally binding, seeks an international approach to migration that “reaffirms the sovereign rights of states to determine their national migration policy” and asserts the “fundamental” importance of legal migration.
But critics in Europe believe it will lead to increased immigration to the continent.
“It’s been approved apparently,” he said. “But the opinion of the people was never asked. That’s strange for something that goes this far.”
Dries Van Langenhove, from the nationalist youth organisation Schild en Vrienden, agreed, saying the protesters wanted to “raise our voice against the Marrakech pact”.
“We think the decision was not made in a democratic way, with a minority in government and a minority of the Belgian people,” he said. “That’s what we are protesting against.”
Image copyright EPA
Image caption Authorities used mounted police and water cannon against some of the protesters
A smaller number of counter-demonstrators objected to the marchers.
“We want to raise the alarm to show that the organisers of the other demo are fascists groups,” Naomi Stocker said.
“They advertise hate and discrimination and are violent. We want to warn people and send a different message.”
Fellow protester, Barend Claessens, said that although they did not want a confrontation with the “extreme right”, the counter-demonstrators wished to show “there are still a lot of people who agree with the pact”.
More and more countries in Europe have clamped down on migration in recent years.
Doctors Without Borders (MSF) was forced to cancel its migrant rescue operations in the Mediterranean this month after repeated battles with Italy.
And in June, Hungary made it illegal to help asylum seekers .
- A daily graphic journalist arrested for filming in Badu Kobi’s Church.
- I regret nothing and repeat the same I said last season – Messi on his Champions league promise.
- We will request Stonebwoy songs to be played in our stadium even if the player’s don’t do – FC Nordsjælland
- Badu kobi sings Shatta Wale’s “I know my level” and threaten his enemies.+video.
- “Oh yeah baby I love it” – Iyanya narrates Yvonne Nelsons’ reaction on their first time in bed.