OTTAWA -- Jagmeet Singh tightened his shaky grip on the reins of the NDP Monday by winning a do-or-die federal byelection in British Columbia.

But the challenge he now faces in reviving the party's flagging fortunes in time for this fall's national election was underscored by the NDP's simultaneous loss to the Liberals in Outremont, the Montreal riding that served as a launching pad for the orange wave that swept Quebec in 2011.

With most polls reporting, Singh captured Burnaby South with more than 38 per cent of the vote, ahead of the Liberal contender with 26 per cent and the Conservative with 22 per cent.

Had he lost, Singh would almost certainly have faced demands to resign as leader. Going into Monday's byelection, many New Democrats -- including Singh's predecessor, Tom Mulcair -- had questioned how Singh could lead the party in the October federal election if he couldn't win a seat for himself.

However, the loss of Outremont cast a pall over Singh's victory celebration.

Lawyer Rachel Bendayan reclaimed the riding for the Liberals with 42 per cent of the vote, even as the governing party struggles with the fallout from allegations that the Prime Minister's Office improperly pressured former attorney general Jody Wilson-Raybould to halt criminal proceedings against Montreal engineering giant SNC-Lavalin.

The NDP's Julia Sanchez captured 27 per cent.

Outremont was a longtime Liberal stronghold until 2007, when Mulcair scored a byelection upset for the NDP, creating a beachhead for the party in Quebec, from which it eventually went on to sweep the province in 2011 and vault into official Opposition status for the first time in party history.

Since those heady days, the party has fallen back to its traditional third-party status. It won just 44 seats in the 2015 election, 16 of them in Quebec. Monday's loss of Outremont gives credence to polls that suggest the party risks being wiped out altogether in Quebec this fall.

Vancouver NDP MP Jenny Kwan acknowledged the loss of Outremont was "a disappointment."

"What we're going to do, of course, is learn from this experience and then we're going to redouble our efforts to ensure that the people of Quebec know we are there for them," she said at Singh's victory party.

In a third byelection Monday, the Conservatives handily hung on to the Ontario riding of York-Simcoe, which had been held since 2004 by former Conservative cabinet minister Peter Van Loan. Scot Davidson took 53 per cent of the vote for the Tories, well ahead of Liberal Shaun Tanaka with 30 per cent.

There were, however, a couple of potentially bad omens for the Conservatives in Monday's results.

The breakaway People's Party of Canada, created last summer by one-time Tory leadership contender Maxime Bernier, faced its first electoral test in the byelections and results suggest it could be a spoiler that deprives the Conservatives of victory in tight contests come the fall.

While the fledgling party won less than two per cent of the vote in Outremont and York-Simcoe, it did surprisingly well in Burnaby South, where Laura-Lynn Tyler Thompson won more than 11 per cent of the vote after running on a "Canadians first" campaign that was denounced as anti-immigration and racist by some supporters of rival candidates.

And in Outremont, the Conservative candidate ran a distant fifth with just over six per cent of the vote, behind the Liberals, NDP, Greens, and Bloc Quebecois.

The Greens, who've watched their vote share increase in a number of other recent byelection contests, came third in Outremont with some 13 per cent of the vote -- up 10 points from the 2015 election. However, the party's vote share was down slightly in York-Simcoe, at less than three per cent. The Greens did not run a candidate in Burnaby South, as a courtesy to Singh.

Singh's win was all the sweeter for the fact that Burnaby South was not a natural home or a safe seat for a former Ontario provincial politician. New Democrat Kennedy Stewart, now mayor of Vancouver, won the riding by just over 500 votes ahead of the Liberals in 2015.

His victory will give Singh some much-needed visibility in the House of Commons in the run-up to the general election and will help put to rest grumbling within NDP ranks about his underwhelming performance since being chosen leader almost 18 months ago.

But his problems go well beyond his low profile on the main stage of federal politics.

Singh has faced criticism about his seeming unfamiliarity with federal issues and his handling of internal caucus discipline.

Under his leadership, the NDP has plunged to its lowest standings in public opinion polls since 2000, when it won just 13 seats. The party is mired in debt and its fundraising results have been dismal. As well, at least 11 of the 44 MPs who won seats for the party in 2015 have announced they won't seek re-election this fall.

While the Liberals could celebrate victory in Outremont, the party's vote share dropped by about seven percentage points in each of the other two byelections -- at least in part likely due to the fallout from the SNC-Lavalin affair.

In Burnaby South, the ruling party was likely also hurt by the fact that it dumped its original candidate after she identified Singh as being of "Indian descent" and contrasted herself as the "only" Chinese candidate in a riding with a large Chinese-Canadian population.

-- With files from Laura Kane in Vancouver

Results so far:

Burnaby South (184 of 196 polls reporting)

  • NDP – Jagmeet Singh: 39 per cent
  • Liberal – Richard T. Lee: 26 per cent
  • Conservative – Jay Shin: 23 per cent
  • People’s Party – Laura-Lynn Thompson: 11 per cent

York-Simcoe (120 of 136 polls reporting)

  • Conservative – Scot Davidson: 53 per cent
  • Liberal – Shaun Tanaka: 30 per cent
  • NDP – Jessa McLean: 8 per cent
  • Green Party – Mathew Lund: 3 per cent

Outrement (163 of 170 polls reporting)

  • Liberal – Rachel Bendayan: 40 per cent
  • NDP – Julia Sanchez: 29 per cent
  • Green Party – Daniel Green: 13 per cent
  • Bloc Québécois – Michel Duchesne: 11 per cent
  • Conservative – Jasmine Louras: 6 per cent