OTTAWA -- The federal Liberals saw their share of the vote drop in two Toronto byelections Monday, a humbling result for Prime Minister Justin Trudeau in the first electoral test of his government's handling of the COVID-19 pandemic.

The Liberals ultimately hung on to Toronto Centre, where broadcaster Marci Ien fended off a strong showing by newly minted Green party leader Annamie Paul.

They also hung on to York Centre, after a nerve-racking few hours in which the lead alternated repeatedly between the Liberals and the Conservatives before Ya'ara Saks finally pulled ahead by just over 700 votes.

The results were surprisingly close for two ridings that had been considered longtime Liberal strongholds.

"These results in two of the safest Liberal seats in the country show Canadians are losing faith in Justin Trudeau," Conservative Leader Erin O'Toole tweeted.

During last fall's general election, the Liberals took Toronto Centre with just over 57 per cent of the vote, York Centre with just over 50 per cent.

On Monday, Ien took 42 per cent of the Toronto Centre vote -- a precipitous 15-point drop from the result garnered last fall by former finance minister Bill Morneau, who resigned abruptly in August amid reports of tensions with Trudeau over massive spending on pandemic relief measures and the fallout from the WE Charity affair.

Paul, meanwhile, soared to a close second with almost 33 per cent of the vote -- more than quadrupling the meagre seven per cent she won in Toronto Centre during the general election. The NDP share of the vote dropped five points to 17 per cent and the Conservative vote share was cut in half to less than six per cent.

Paul had urged Trudeau to postpone the byelections, arguing that it was unsafe to send voters to the polls in the midst of the second wave of the deadly coronavirus.

York Centre was left vacant last month by Liberal MP Michael Levitt's resignation to become CEO of the Friends of Simon Wiesenthal Center for Holocaust Studies. Although long considered one of the safest Liberal seats in the country, York Centre fell to the Conservatives in 2011 before Levitt wrested it back in 2015.

It turned into a cage match between the Liberals and Conservatives again Monday.

In the end, Saks, a Jewish activist and businesswoman, took almost 46 per cent of the vote for the Liberals, a drop of about four points from Levitt's share. Under Julius Tiangson, a businessman and activist in the riding's sizeable Filipino community, the Conservative share of the vote rose five points to almost 42 per cent.

The York Centre race would likely have been even more of a squeaker had it not been for the presence of one-time Conservative leadership runner-up Maxime Bernier, who ran in the riding for his breakaway Peoples Party of Canada. He captured a little more than 600 votes, less than four per cent, most of it likely drawn away from his former party.

The NDP dropped four points in York Centre to less than six per cent of the vote, while the Greens dropped almost one point to 2.6 per cent.

Voter turnout was higher than average for byelections: 25.6 per cent in York Centre and 30.9 per cent in Toronto Centre.

This report by The Canadian Press was first published Oct. 26, 2020.