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 across the country.

The scene was far different than that one 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 protest didn't materialize.

The rallies sprung up in the wake of last week's deadly events in Charlottesville, Va., 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 if the unprecedented number of border crossers was stoking anti-immigrant sentiments in the country, Trudeau condemned the "intolerant, racist demonstrations." He said he stood with millions of Canadians "who reject the hateful, harmful, heinous ideologies" that have sprouted across the country.

"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 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 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 United States 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.

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 associated with an anti-fascist group 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.

Quebec Premier Philippe Couillard tweeted about the violence, 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."

At least two Quebecers were identified participating in a white supremacist rally last week in Charlottesville, Va., that ended in violence and the death of a 32-year-old woman. La Meute suspended one of the two men from the group's activities with a spokesman saying La Meute dissociates itself from white supremacist and racist groups.

Trudeau also expressed condolences to the families of Canadians killed in terror attacks this past week in Burkina Faso and Barcelona. He called the attacks "despicable" and attempts to pit neighbour against neighbour.

"These cowards will not win. We will continue to do as we have done, standing united and stronger in the face of hatred. We will be emboldened in our values, values of love, acceptance and strength through diversity. My friends, in the wake of terror, let us never lose sight of who we are."

Keep reading