TORONTO — Prime Minister Justin Trudeau, the selfie-snapping Liberal leader who swept to power and international fame four years ago with promises of “sunny ways,” heads into Monday’s federal election with his star dimmed and his political future in jeopardy.

Polls show Trudeau’s Liberals and Andrew Scheer’s Conservatives locked in a tight race, with neither party building the necessary momentum to win an outright majority in Parliament. That would leave the winner dependent on smaller parties to maintain power.

Despite Trudeau’s blackface scandal and a lesser kerfuffle about Scheer’s U.S. citizenship and resume claims, the state of play as the race comes down to the wire has changed little since the campaign began nearly six weeks ago.

“This election has been a bit like a rugby scrum where everyone has been locked in and not really able to give a lot of way on both sides of the pitch,” said pollster Shachi Kurl, executive director of the Angus Reid Institute. “And the ground beneath them is only getting muddier.”

In the final days of the campaign, Scheer, 40, and Trudeau, 47, have doubled down in the key battlegrounds where elections are won and lost: The ethnically diverse suburbs of Toronto and Trudeau’s home province of Quebec.

Analysts say a bump in support for Jagmeet Singh’s New Democrats and Yves-François Blanchet’s separatist Bloc Québécois Party threatens the political fortunes of both front-runners.

This election was supposed to be a cinch for Trudeau, whose father, Pierre Elliott Trudeau, was one of Canada’s longest-serving prime ministers.

He seemed to sail through his first few years in office, earning international acclaim for swearing in a gender-balanced cabinet, greeting Syrian refugees at Toronto Pearson International Airport and legalizing recreational cannabis.

But a series of scandals have sullied his image, spurring rivals to assail him as a “fraud” who acts one way in public and another in private.

Canada’s ethics watchdog rebuked him in August for inappropriately pressuring his former attorney general to cut an out-of-court settlement with SNC-Lavalin, a Quebec-based construction giant facing criminal charges. Last month, his campaign was upended — at least briefly — by revelations that he wore brownface and blackface several times as a younger man. He has apologized, repeatedly.

“2019 has been the story of Justin Trudeau as an average politician just like all the other politicians,” Kurl said. “The magic sparkle dust that he had in 2015 has largely worn off.”

Ryan Currie, a 21-year-old political science student at the University of Toronto, is voting in his first federal election. Young voters proved critical for Trudeau in 2015, but Currie is voting for the Conservatives. He says the Liberal Party has moved too far to the left, and he’s put off by Trudeau’s “history of scandals,” particularly the SNC-Lavalin affair.

The way he handled it highlighted his arrogance,” Currie said.

Scheer, an affable social and fiscal conservative, faces his own hurdles. Since becoming party leader in 2017, he has struggled to expand his party’s appeal beyond its base and remains somewhat unknown to voters. Foes have attacked him for his antiabortion views, for misrepresenting his work experience and for not disclosing his dual U.S.-Canadian citizenship until it was revealed this month by the Globe and Mail.

No single issue has dominated the campaign, but the environment stands out as a key area of disagreement. Scheer has pledged to “use every legislative tool” to repeal the Liberal government’s levy on carbon. Trudeau has committed Canada to net-zero emissions by 2050. Critics to the left of Trudeau say both leaders have unambitious plans that are scant on details.

Analysts say the election’s results will hinge on whether progressive voters coalesce around Trudeau as they did in 2015, and on whether disillusioned voters choose to sit this one out.

Four years ago, Elena Kazias voted for the Liberals. This time, the retired teacher is all in on the New Democratic Party. She was already smarting over the Trudeau government’s decision to buy an oil pipeline last year given its pledge to fight climate change. Singh’s debate performances sealed the deal.

“Singh gave forthright answers,” Kazias said. “I was very disappointed in Trudeau not answering the questions that the moderators posed to him.”

Chatter about a looming minority government has bubbled on the campaign trail and beyond.

At a campaign event in Montreal, Trudeau delivered the conventional Liberal warning to voters who could split the progressive vote by casting their ballots for the NDP or Greens: Don’t do it, unless you want to wake up Tuesday morning to Prime Minister Scheer.

Singh, 40, has ruled out supporting a Conservative minority government and said last week that he’d “absolutely” form a coalition, in which the parties shared cabinet seats — to block Scheer. But he has since walked those comments back. He urged voters Thursday in Brampton, Ontario, to “vote for what you believe in.”

Scheer, appearing at a freight trucking facility in Brampton earlier in the day, warned that a Liberal-NDP coalition would be one “that you cannot afford.”

Pollster Bruce Anderson, chairman of Abacus Data, says the Conservatives would have few natural allies in a minority scenario and could face pressure from the other parties to make concessions on issues such as the environment to earn their support.

The election in Canada, a close security and trade partner, has implications for the United States — and at least one American political figure has been paying attention. Former president Barack Obama offered a rare cross-border endorsement of Trudeau’s reelection bid last week, tweeting that “the world needs his progressive leadership now.”

Whatever the outcome, Christopher Sands said, Canada is likely to ratify the United States-Mexico-Canada Agreement if and when the U.S. does. Sands, director of the Center for Canadian Studies at Johns Hopkins University, said there is potential for greater cooperation on issues such as energy infrastructure with a Conservative government.

Scheer has pledged to tighten the U.S.-Canada border by closing a loophole in a law that allows asylum seekers who cross into Canada at an unauthorized point of entry to file a claim. He did not say what he would do if President Trump opposed such a proposal.

Canadians complain that the campaign has been dull and atypically divisive. Trudeau, who took the unusual step of wearing a bulletproof vest at a campaign event this month in Mississauga, Ontario, because of an unspecified security threat, accused the Conservatives of running “one of the dirtiest, nastiest campaigns.”

“Partisanship isn’t new in Canada, but this idea of ‘I don’t like you just because you’re from that party’ is something we’re seeing more than before,” said Melanee Thomas, a political scientist at the University of Calgary.

Sands expected the campaign to be more positive.

“As an American, I look at it and say, ‘There’s another bad idea they’ve imported from us.’ ”