Andrew Scheer’s Quebec team is distancing itself from an online post in an anti-immigration group, made by a local riding president who claimed he was helping campaign for the federal Conservative leader in a provincial by-election on Monday.

Catherine Major, the Conservative party’s Quebec press secretary, said she demanded the resignation of Rivière-du-Nord riding president Hugues Bonneau, after he told a Facebook group for fans of Quebec-based La Meute that he is friends with Ms. Major and was collecting supporters’ names on her behalf for an event with Mr. Scheer in Chicoutimi last week.

“We are not affiliated with [La Meute] at all. They are not part of our party,” Ms. Major told the Globe on Monday.

Story continues below advertisement

“Our positions are clear. We don’t accept this, we condemn any racism. So those people can do what they want but we don’t agree with this.”

Ms. Major said she spoke with Mr. Bonneau on Monday and he resigned as president. Reached by phone earlier in the day, Mr. Bonneau told the Globe he was not interested in speaking and hung up.

La Meute (the French word for wolf pack) is a self-styled anti-Islamist and anti-multiculturalism group. Some of its members participated in a campaign against the creation of a Muslim cemetery near Quebec City last year.

In his post, made from a personal Facebook account, Mr. Bonneau specifies that he acts as an electoral district president in his civilian capacity and not as a “wolf.” Ms. Major said she is friends on Facebook with Mr. Bonneau in his political capacity and his political online profile has nothing to do with La Meute. She said the invitation for Mr. Scheer’s event referred to in Mr. Bonneau’s post was sent to all Quebec party members, and Mr. Bonneau had told her he had friends in Chicoutimi who wanted to attend. She asked him for the names to keep track of how many people were coming.

The Facebook group was set up for fans of La Meute in the nationalist Saguenay region, part of the Chicoutimi-Le Fjord riding where a federal by-election was held on Monday and where Mr. Scheer hoped to make inroads in Quebec before the 2019 general election.

Chicoutimi-Le Fjord is a swing riding. Over the past two decades, voters there have elected Liberal, NDP, Bloc Québécois and Conservative MPs. It was most recently Liberal.

In Monday night’s by-election, Conservative candidate Richard Martel stole away the riding from Justin Trudeau’s Liberals.

Story continues below advertisement

This is the second time in a month that a Conservative riding president in Quebec has come under fire for comments made online. In May, the president of the Louis-H é bert riding, Francois Labrecque, resigned after making anti-Islamic and homophobic comments on Facebook.

In January, Mr. Trudeau referred to La Meute as “bozos” during a one-year commemoration of the Quebec City mosque killings.

At the time, Quebec Conservative MP Pierre Paul-Hus said the attack on La Meute was unbecoming of a Prime Minister, saying groups should not be targeted because of their vision of the country.

“Canada’s Prime Minister must speak in a way that is respectful of people. Calling people bozos, those are not words that should come out of the Prime Minister’s mouth,” Mr. Paul-Hus said after Mr. Trudeau defended his comments.