Tensions boiled over in Quebec City on Sunday, as police were pelted by beer bottles and smoke bombs set off in garbage cans in an ugly end to a weekend of pro and anti-immigrant rallies.

The Quebec group La Meute, which is associated with the far right, called for a rally Sunday to protest the federal and provincial government's handling of the border crossers, but ended up having its members pinned inside a garage while counter-protesters demonstrated outside.

Once the counter-protesters turned violent, the Quebec City police declared the protest illegal. Clashes ensued and at least one protester was arrested as officers tried to block access to the building where some of the La Meute protesters had taken refuge.

Story continues below advertisement

By 6 p.m. the counter-protesters had dispersed and the members of La Meute, many of them carrying flags featuring the group's wolf-paw logo, emerged from the building to begin their protest.

Television footage showed them marching in silence near Quebec City's legislature.

The protests in the Quebec capital were far more tense than a demonstration a day earlier in Vancouver where thousands of people peacefully demonstrated in an anti-racism rally in response to reports earlier in the week that an anti-Muslim protest was planned. That latter rally didn't materialize.

The rallies sprung up in the wake of last week's deadly events in Charlottesville, Va. in which one person was killed and others injured when a vehicle plowed through a crowd of anti-racism protesters.

The Quebec events were largely spurred by the unprecedented number of people walking across the border to seek asylum.

Almost 6,800 people showed up at an unofficial crossing from the U.S. into Quebec since Canada Day to claim asylum. By comparison, only 2,920 claims were filed in Quebec in all of 2015.

When asked Sunday if the unprecedented number of border crossers was stoking anti-immigrant sentiments in the country, Prime Minister Justin Trudeau condemned "intolerant, racist demonstrations." He said he stood with millions of Canadians "who reject the hateful, harmful, heinous ideologies" that have sprouted across the country.

Story continues below advertisement

"The small minority, angry, frustrated group of racists don't get to define who we are as a country, don't get to tell others who we are and don't get to change the nature of the open, accepting values that make us who we are," Trudeau said in Montreal hours before the Quebec City demonstration.

Federal authorities have said more than 3,800 people walked over the border into Quebec through the first two weeks of August, compared to the 2,996 who similarly crossed the border throughout all of July. Many are being housed in temporary shelters, including tents along the Quebec-New York border and inside Montreal's Olympic Stadium, while officials handle the sudden surge in asylum claims.

Haitian nationals form the bulk of recent arrivals, believed to be driven by a change in U.S. policy that many fear would result in mass deportations. Canada lifted the temporary restriction on deporting Haitians last year, set up in the wake of the 2010 earthquake, and many were sent back to the island nation, Trudeau said.

Trudeau urged Canadians to maintain trust in the immigration system and the officials who he believed were managing the situation. He said none of those walking across the U.S. border would receive any special advantages in their quest to come to Canada, stressing to Canadians and would-be refugees alike that border hoppers must go through the usual security checks and immigration evaluations.

Quebec Premier Philippe Couillard tweeted about the violence in the provincial capital Sunday, saying that people have the right to demonstrate peacefully with zero tolerance for violence.

"We condemn violence and intimidation. We live in a democracy where respect must be the norm and not the exception."