OTTAWA -- Ontario voters in two electoral ridings will head to the polls on Oct. 26, as Prime Minister Justin Trudeau has officially called the byelections for Toronto Centre and York Centre.

The Prime Minister’s Office announced the byelections in a Friday press release.

The news comes just one day after Trudeau appointed the candidates in both ridings — marking a shift from the Liberal Party's previous stance of holding open nominations to allow Liberals to crown their own candidates.

The Liberal Party's spokesperson, Braeden Caley, confirmed the news of the appointments in an emailed statement sent to CTV News on Thursday.

"Devoted Toronto community leader and veteran broadcaster Marci Ien will be the Liberal candidate for the upcoming by-election in Toronto Centre," Caley said in the email.

He also said that the Liberals will be appointing Ya’ara Saks as their candidate in York Centre, the seat previously held by Liberal MP Michael Levitt. Levitt stepped away from politics on Sept 1 to take on a new role as the CEO of the Friends of Simon Wiesenthal Center for Holocaust Studies.

Toronto Centre was the seat former finance minister Bill Morneau held until his resignation on Aug 17. Morneau stepped down in the midst of the WE Charity controversy — though he did not attribute his decision to resign to the scandal.

Both seats have been safely Liberal since at least the '90s, though York Centre briefly went Conservative for four years from 2011 to 2015 — meaning the seat may prove slightly more challenging for the Liberals to keep.

There is also interest from some opposition candidates, with Green Party leadership hopeful Annamie Paul eyeing a run in the riding, if the party allows her to bend its leadership rules.

“I will be asking them for a special dispensation… I was proud to run for the Greens in 2019 in Toronto Centre and would be proud to run there again,” Paul said in a statement.  

The byelections, which are both slated to take place in the densely populated city of Toronto, will provide an opportunity for Elections Canada to take a pulse of how an election would work as the COVID-19 pandemic continues to spread.

They will be the first time a federal byelection is held in any federal riding amid the ongoing public health crisis.

Reacting to the news, NDP Leader Jagmeet Singh criticized the move, saying that Elections Canada has already given notice that it can’t run on-campus voting during the pandemic.

“We can’t let this stand. Justin Trudeau should not have created this problem,” Singh said. “For months we’ve been calling on the government to put in place changes to ensure elections follow safe protocols, We’ve been trying to make sure everyone can vote and have their voice heard, Students have a right to vote. We need to make it easier not harder for them to vote."

So far, the only COVID-era byelection to date took place in New Brunswick. New Brunswick is home to over 775,000 residents, while Toronto has nearly 3 million residents.

The news also comes amid federal election speculation. With a looming throne speech vote that could topple the government, Prime Minister Justin Trudeau has said that he doesn’t want a federal election — but that if one is forced, Elections Canada would be ready.

"I think it's irresponsible to say that an election would be irresponsible. Our country and our institutions are stronger than that, and if there has to be an election, we’ll figure it out," Trudeau said, speaking at a Wednesday press conference.

"I think I should, and we all should, have tremendous confidence in Elections Canada to be able to bring forward strong measures to keep us safe and allow for the expression of the democratic will of the people."

Those measures will be put to the test on Oct. 26, when the residents of Toronto Centre and York Centre will head to the polls.

With files from CTV News’ Rachel Aiello