Canadians are heading to the polls to cast their ballots following a 40-day election campaign that featured countless promises, numerous personal attacks and enduring uncertainty right up to the finish line.

Polls have officially opened across the country and millions of Canadians are expected to cast their ballots in this country's 43rd federal election, which many experts believe will result in a hung Parliament.

The Liberals under Justin Trudeau and Conservatives under Andrew Scheer started the election largely neck-and-neck in opinion polls and, despite their best efforts, neither leader seems to have been able to jump ahead.

Trudeau voted in his Montreal riding of Papineau on Monday after flying back the night before from British Columbia, where he spent the final day of the campaign and which could prove critical to deciding which party gets to form government.

The Liberal leader, who came to power in 2015 on an inspirational promise of governing differently, suffered an uneven election campaign this time around thanks in part to revelations he wore racist makeup before entering politics.

The SNC-Lavalin affair also continued to dog Trudeau, as did anger among some progressives over his failure to reform the electoral system and his government's decision to buy the Trans Mountain oil pipeline.

Scheer was scheduled to cast his ballot later in Regina after also spending Sunday in Vancouver and B.C.'s Lower Mainland in the hopes of securing enough seats to knock off the incumbent Liberals.

Like Trudeau, the Conservative leader faced challenges on the campaign trail, where he was seen as underperforming in the first French-language debate and faced pointed questions about his position on abortion and climate change.

The other leaders also sought to portray a Tory government as one that would cut services for Canadians after Scheer promised to balance the budget in five years, and he faced questions about his U.S. citizenship and claims to have been an insurance broker.

Ultimately, once all the ballots are cast and counted, the balance of power could reside with one of the other main parties should neither the Liberals nor Conservatives secure enough seats to win a majority government.

NDP Leader Jagmeet Singh, who will spend election night in his B.C. riding of Burnaby South, entered the campaign facing questions about his leadership thanks to lacklustre fundraising, a shortage of candidates and other organizational challenges.

More than a month later, however, Singh is seen to have run a surprisingly strong campaign that has attracted many progressive voters, resulting in a bump in the NDP's polling numbers, even though the party's chances in Quebec remain uncertain.

Bloc Quebecois Leader Yves-Francois Blanchet has overseen a surge in support in la belle province after his party was largely left for dead after abysmal results in 2011 and 2015 followed by years of infighting.

While many Quebecers say sovereignty is not a priority, Blanchet has been able to tap into the same nationalist sentiment that propelled the centre-right Coalition Avenir Quebec to power at the provincial level.

That resurgence has come at the expense of the Liberals, Conservatives and NDP, all of which entered the campaign hoping to win over Quebecers, who have historically played a major role in deciding the makeup of the government in Ottawa.

Meanwhile, Green Leader Elizabeth May, who will be in her riding on Vancouver Island, is hoping her party can capitalize on its recent success in provincial votes and translate that to more seats in the House of Commons.

And Maxime Bernier, who has spent much of the campaign trying to protect his own seat in Quebec, will find out whether his upstart People's Party of Canada is a movement or a footnote.

The first polls will close around 7 p.m. ET in Newfoundland and Labrador, with the last closing in B.C. at 10 p.m.

Elections Canada says roughly 27.4 million people are eligible to vote, and while most voters will cast their ballots today, around 4.7 million took advantage of advance polling last weekend. That marked a 29 per cent increase over 2015.

Voter turnout in the last election stood at 68.5 per cent, which was the highest since 1993.

This report by The Canadian Press was first published Oct. 21, 2019.