OTTAWA - The Conservatives have stolen a Quebec riding away from Justin Trudeau's ruling Liberals, in the first test of Andrew Scheer's effort to recreate the nationalist-conservative coalition that helped federal Tories dominate the province in the 1980s.

Conservative candidate Richard Martel captured 52.7 per cent of the vote in a federal byelection held in Chicoutimi-Le Fjord - more than 5,000 votes ahead of Liberal Lina Boivin, who took 29.5 per cent.

The NDP and Bloc Quebecois candidates were not in contention, capturing just 8.7 per cent and 5.6 per cent respectively, while the Green candidate brought up the rear with just 3.1 per cent of the vote.

Just 36 per cent of eligible voters bothered to cast ballots.

The byelection was precipitated by the resignation of rookie Liberal MP Denis Lemieux.

He won the riding almost by fluke in the 2015 general election, with just 31 per cent of the vote. At that time, the contest was a four-way fight, with the NDP capturing 29.7 per cent of the vote, the Bloc taking 20.5 per cent and the Conservatives taking 16.6 per cent.

Boivin's showing Monday was only marginally worse than Lemieux's but there was no longer a split vote for her to benefit from. The Conservatives, who've been assiduously wooing former separatists and soft nationalists in the riding, benefited from the collapse in support for the Bloc and NDP, vaulting from fourth place to first.

Conservative Leader Scheer campaigned in the riding last week with former Bloc leader Michel Gauthier, who urged voters who used to support the separatist party - currently leaderless and in disarray after months of infighting - to switch their allegiance to the Conservatives.

Scheer has also endorsed a number of Quebec-focused policies designed to appeal to erstwhile separatists and soft nationalists - such as allowing Quebec to collect federal taxes on Ottawa's behalf so that Quebecers would be able to file a single federal-provincial tax return each year, rather than the two they're currently required to file.

As well, Scheer has said he'd give Quebec more power over culture and immigration and has promised to crack down on the influx of irregular refugee claimants, which has become a particular problem at Quebec's Lacolle border crossing.

He made no mention of any of that Monday as he welcomed Martel's byelection victory.

"Quebecers and Canadians are tired of the prime minister's big deficit and high tax agenda. More and more, they are disappointed by this Liberal government and understand that only the Conservative Party can defend their interests," Scheer said in a written statement.

"Conservatives believe in responsible spending and in lowering taxes to make life more affordable for all Canadians. I look forward to working with Richard to spread our positive Conservative vision for Canada."

Chicoutimi-Le Fjord marks the Liberals' first byelection defeat in a held riding since Trudeau became Liberal leader in 2013. For the Tories, Monday's victory will help make up for the three ridings Trudeau's Liberals have stolen from them in byelections, in addition to one snagged from the NDP.

The byelection comes just as Trudeau is mired in a nasty trade dispute with U.S. President Donald Trump.

The riding is in Quebec's Saguenay region, the heart of the province's aluminum industry.

Trump has imposed a tariff of 10 per cent on aluminum imports and 25 per cent on steel, using national security as the justification. Trudeau has called that "insulting" to Canada and has vowed to slap dollar-for-dollar tariffs on a range of U.S. exports to Canada, starting July 1.

Trudeau's stance earned him an unprecedented, personal attack from Trump and his emissaries following the G7 summit in Quebec earlier this month. Trump called the prime minister "weak" and "dishonest" while one of his top aides said there's "a special place in hell" for Trudeau and others who negotiate in bad faith with the president.

While opinion polls suggest Canadians have rallied behind Trudeau, the issue evidently didn't help Liberal fortunes in the byelection.

Canada's supply management system for dairy, eggs and poultry has also been in Trump's crosshairs of late. While Trudeau has vowed to defend the system, his suggestion in a U.S. television interview that he's willing to be "flexible" on the subject has concerned dairy farmers in Quebec, some of whom protested during a campaign stop the prime minister made in Chicoutimi-Le Fjord earlier this month.

Scheer had his own woes over supply management. Last week, he fired one-time leadership rival Maxime Bernier from his post in the Conservative shadow cabinet after Bernier posted on his website a controversial chapter from his forthcoming book.

In that chapter, Bernier, a staunch advocate for dismantling supply management, accuses Scheer of winning the leadership by mobilizing Quebec dairy farmers to ensure Bernier wasn't victorious.

That controversy doesn't appear to have hurt the Conservatives in Monday's byelection.

They bolstered their chances in the riding by choosing Martel as their candidate, a well known junior hockey coach who was easily the highest profile contender in the race. A well known local candidate can be particularly influential in a byelection, when voters know their choice will make no difference to which party forms government.

Chicoutimi-Le Fjord was held by the Bloc from 2004 to 2011, when the NDP snagged the riding as part of the orange wave that swept the province.

Monday's result is more dismal news for NDP Leader Jagmeet Singh, whose efforts to re-ignite the party have shown no discernible results so far.

And it doesn't bode well for the NDP in another imminent Quebec byelection once Singh's predecessor, Tom Mulcair, resigns his Montreal seat of Outremont later this month.