Several hundred mainly peaceful protesters filled a heavily protected street of Quebec City on Thursday night, on the eve of a G7 summit that will bring U.S. President Donald Trump to Canada for the first time.

The protesters marched down the streets flanked on each side by police in riot gear. Moments of tension and confrontation -- including the burning of flags, some masked demonstrators and a small number of arrests -- quickly quieted down, even as the city braced for more.

Quebec City's historic district looked as though business owners were preparing for a mini hurricane to blow through the cobblestone streets, as several storefronts were barricaded with plywood in anticipation of anti-G7 protests.

Stores that were open for business vastly outnumbered the shuttered facades. But the police presence in the old city was noticeable -- squad cars drove through the area and uniformed officers kept watch at different spots across the neighbourhood popular with tourists and locals alike.

On Thursday evening, rows of officers in protective gear watched closely as protesters gathered for what organizers had described as a "festive mass demonstration against the G7, capitalism, patriarchy, colonialism, racism, and borders."

The atmosphere was mainly upbeat, with some wearing colourful costumes and bearing signs advocating for such diverse causes as food security, open borders and environmental protection.

For a pay-what-you-want donation, protesters were offered zucchini cake, rice and tofu, and vegetable soup.

G7 protest

Alice-Anne Simard of environmental group Eau Secours declined to condemn possible violence.

"We will not condemn acts that have not been committed," she said. "We are here to protest and we are here to denounce the violence of the neoliberal policies of the G7 members."

Masked protesters got into minor scuffles with photographers and camera people. They tried to push cameras away and block the view of journalists trying to take photos of them, yelling aggressively.

"This is not a discussion. Don't film us."

While the G7 summit will be held 140 kilometres northeast of Quebec City in the resort town of La Malbaie, diverse groups including unions, aid organizations and anti-capitalists have been organizing protests in the provincial capital. Police have been making parallel arrangements, with 8000 of them ready to jump into action in the province.

The number of detention spaces that have been opened up around the Quebec City-area in anticipation of protests is leading human rights groups to worry about the intentions of security forces.

Representatives from Amnesty International and Quebec's league for civil liberties say they've been told by police that officers aren't looking to make any mass arrests.

"But with all the security measures that have been put in place, it's leading us to believe there is a gap between the discourse and the reality," said Genevieve Paul, head of the francophone Canadian branch of Amnesty International.

Her group and Quebec's league for civil liberties are sending 44 observers to the protests, which are likely to continue well into Saturday night.

Paul said prisoners in Quebec City's provincial jail have been transferred to other detention centres in order to liberate about 230 spots for protesters.

Police have erected a temporary detention centre near Quebec City's Victoria Park, and another temporary jail in a town a few kilometres north of La Malbaie.

Nicole Filion, with Quebec's league for civil liberties, said she worries about the possibility of mass arrests, the conditions of detainees inside the temporary jails, and the potential misuse of crowd-control weapons by police, such as rubber-ball blast grenades.

Cyndi Pare, spokeswoman for Quebec City's police force, said it would be "inappropriate" to speculate in advance about police actions.

"We can't establish whether there will be mass arrests or not. It's impossible to predict how (protesters) will act and how police will react.

"Police are trained to use force with flexibility and discretion."

The city and the province will reimburse citizens and merchants for broken windows and other damages sustained due to vandalism during the protests, Quebec City Mayor Regis Labeaume said.

Prime Minister Justin Trudeau was asked Thursday in Saguenay, Que., if he had a message for protesters in Quebec City.

"In a country like Canada, I find it extremely important that people are able to express their agreement or disagreement with politics, individuals, their concerns," Trudeau said.

"It must obviously be done with respect and, above all, security. And we will ensure that protesters and citizens and G7 participants are safe."

The last time Canada hosted a similar event, the G20 summit of 2010 in Toronto, officers arrested hundreds of people and kept them in conditions Amnesty International described as inhumane.

While no major protests have been planned in the G7 host town, groups opposed to the summit held a news conference in La Malbaie on Thursday to denounce what they called the "undemocratic" free speech zone that has been set up to accommodate them along the bank of the St. Lawrence river.

They said the fortified enclosure and security checkpoints would be intimidating to protesters, and noted that the site was some distance away from where the leaders will be meeting.

In Quebec City, however, there was no hint of protesters feeling inhibited.

When the protest was declared over, a few girls were sitting down in the middle of the street as a drone and helicopters buzzed overhead, outside the Hilton hotel.

Fifteen-year-old Celestine Uhde was getting her hair cut by a friend.

"It's been a while since I wanted to cut my hair," she said, as her brown locks fell to the concrete. "I know it's impulsive -- but there was a lot of impulsivity tonight!" she said.

"I think the protest was peaceful. The police presence was useless. This was a model protest and what they all should be like."

-- With files from Melanie Marquis in La Malbaie