Once a political rock star, Canadian Prime Minister Justin Trudeau is facing challenging general elections on Monday after two major scandals tainted his image.
Trudeau, 47 is viewed as one of the last remaining progressive leaders in the western world.
He was endorsed by former Democratic US President Barack Obama in the final stretch of the campaign.
A year ago, no one would have predicted that Trudeau risked being the first prime minister since the 1930s to secure a parliamentary majority and then fail to win a second term.
Trudeau's image tainted by scandals
But the liberal image of Trudeau, who has championed diversity as prime minister, took a severe blow when pictures emerged early in the campaign of him wearing blackface in the early 1990s and in 2001.
Trudeau had already been wrestling with the fallout from accusations he pressured his justice minister to help shield engineering firm SNC-Lavalin Lavalin Group Inc from corruption charges. In August, a top watchdog said Trudeau breached ethics rules.
Trudeau, the son of former Canadian Prime Minister Pierre Trudeau, has also had to overcome a sense of fatigue with his government.
His Liberals and the main opposition Conservatives led by Andrew Scheer are in a neck-and-neck race, according to opinion polls.
"The truth is it's a coin toss right now," said Ipsos pollster Darrell Bricker.
EKOS Research pollster Frank Graves said Liberals needed turnout to be similar to four years ago or otherwise the Conservatives may have an edge.
"We may well be waiting until the final vote tallies in British Columbia to see who will win on Monday," Graves said.
Scheer, Trudeau's main rival
Scheer, 40, although a career politician, is running his first campaign as party leader after winning a bitter Conservative leadership fight in 2017.
One of the defining moments of the campaign was when Scheer attacked Trudeau during the English-language debate.
"He can't even remember how many times he put blackface on, because the fact of the matter is he's always wearing a mask,"
Scheer said. "Mr. Trudeau, you are a phony and you are a fraud and you do not deserve to govern this country."
In his bid to unseat Trudeau, Scheer is also promising to balance the federal budget and eliminate a "carbon tax" on fossil fuels.
Minority government a possible outcome
The latest opinion polls suggest Trudeau may narrowly return to office with a minority in the 338-seat House of Commons.
That would still leave Trudeau in a weakened position and needing the support of left-leaning opposition parties. Five parties are contesting Canada's federal election to push through key pieces of legislation.
Given the fact that neither of the front-runners could come away with a parliamentary majority, it is the smaller left-leaning New Democratic Party (NDP) or the separatist Bloc Quebecois that could end up holding the balance of power.
Only six weeks ago, both those parties looked like they were heading toward electoral disaster. But NDP leader Jagmeet Singh and the Bloc's Yves-Francois Blanchet have won praise for campaigns in which they cast themselves as alternatives to the leaders of the big parties.