OTTAWA (Reuters) - Canadian Prime Minister Justin Trudeau, who swept to power on a wave of optimism in 2015, is set for an ugly reelection campaign this October, judging by exchanges with voters in public town halls this month where he was grilled on topics ranging from immigration to housing affordability.

Canada's Prime Minister Justin Trudeau takes part in an interview with Maclean's journalist Paul Wells at the National Arts Centre in Ottawa, Ontario, Canada, September 17, 2018. REUTERS/Chris Wattie

Opinion polls show his center-left Liberals are barely ahead of their rivals, and party insiders privately admit they might lose their majority in the House of Commons, which would crimp the government’s ability to govern.

“The next election is going to be a referendum on Justin Trudeau...and whether or not people think he has performed,” said Ipsos Public Affairs pollster Darrell Bricker.

In contrast to more gentle exchanges in previous years, angry citizens slammed Trudeau for bungling the construction of pipelines, breaking promises to respect the right of indigenous groups, ignoring a pledge to balance the budget and allowing too many migrants into Canada.

Liberal insiders say as a result of the feedback from the town halls, where attendees can also jot down their concerns on paper, policy tweaks are already being considered.

Public unhappiness over illegal immigrants crossing the border from the United States is so great that the party will consider a promise to clamp down further, even though Ottawa considers the matter is under control, said one top Liberal.

Widespread complaints about the lack of affordable housing are likely to produce a commitment for more spending, said the Liberal, who declined to be identified given the sensitivity of the situation.

WE HANG TRAITORS FOR TREASON

The verdict from voters is definitely mixed, judging by Trudeau’s experiences as he traveled the country in January taking questions from all-comers, a practice he says helps him break out of what he calls the Ottawa bubble.

A woman at a town hall in the province of Saskatchewan in Canada’s west, a region where the Liberals are in trouble, accused Trudeau of “working for your globalist partners” to betray Canada.

“What do we do with traitors in Canada, Mr. Trudeau? We used to hang them, hang them for treason,” the woman told the stunned prime minister after asking him about Moslem sharia law and Saudi Arabian oil imports.

In the Quebec town of Saint-Hyacinthe, a man dressed in a yellow vest swore loudly at Trudeau and accused him of selling out the country.

Liberals like the town halls on the grounds they demonstrate Trudeau is not afraid to take tough questions.

Yet they also admit the exchanges show voters have more urgent concerns than topics such as gender equality, climate change and the aboriginal rights that Trudeau has been pushing hard at home and abroad since he took power in 2015.

“We need to focus on things that are of interest to all Canadians and not just some of them,” conceded a second Liberal.

While Trudeau has emerged as one of the world’s leading progressive leaders, at home Canadians are concentrating more on their jobs and taxes, said Bricker.

Infrastructure Minister Francois-Philippe Champagne, present in the hall at Saint-Hyacinthe as abuse was leveled at Trudeau, conceded, “There is a level of anxiety out there and we need to allow for these discussions to happen.”

But insiders say regardless of the insults, Trudeau intends to stick to his policy of avoiding public arguments.

The Liberals won a surprise victory in 2015 by mounting a massive campaign to register young and aboriginal voters and concede a similar effort will be needed this time.

The Liberals have a majority of just 11 in the 338-seat House of Commons and polls show they are only slightly ahead of the main opposition Conservative Party, led by Andrew Scheer.

“It’s going to be tight...the message to the troops is, there is no magic commercial advert that is going to win this campaign. Don’t rely on the prime minister to belt one out of the park during the debates,” said a third Liberal.