Canadian Prime Minister Justin Trudeau faced the threat of being knocked from power after one term as the nation held parliamentary elections on Monday. The 47-year-old Trudeau channeled the star power of his father, the liberal icon and late Prime Minister Pierre Trudeau, when he won in 2015 but a combination of scandal and high expectations have damaged his prospects.

Polls indicate Trudeau's Liberal Party could lose to the rival Conservatives, or perhaps win but still fail to get a majority of seats in Parliament and have to rely on an opposition party to remain in power. Not in 84 years has a first-term Canadian prime minister with a parliamentary majority lost a bid for re-election.

Trudeau reasserted liberalism in 2015 after almost 10 years of Conservative Party government in Canada, but he is one of the few remaining progressive leaders in the world. He has been viewed as a beacon for liberals in the Trump era, even appearing on the cover of Rolling Stone magazine under the headline "Why Can't He Be Our President?"

Get Breaking News Delivered to Your Inbox

Perhaps sensing Trudeau is in trouble, Barack Obama made an unprecedented endorsement by a former American president in urging Canadians to re-elect Trudeau and saying the world needs his progressive leadership now.

I was proud to work with Justin Trudeau as President. He's a hard-working, effective leader who takes on big issues like climate change. The world needs his progressive leadership now, and I hope our neighbors to the north support him for another term. — Barack Obama (@BarackObama) October 16, 2019

Trudeau responded to the former president's endorsement on Twitter, writing, "Thanks my friend, we're working hard to keep our progress going."

But old photos of Trudeau in blackface and brownface surfaced last month, casting doubt on his judgment.

Trudeau also was hurt by a scandal that erupted this year when his former attorney general said he pressured her to halt the prosecution of a Quebec company. Trudeau has said he was standing up for jobs, but the damage gave a boost to the Conservative Party led by Andrew Scheer.

No party is expected to get a majority of Parliament's 338 seats, so a shaky alliance may be needed to pass legislation.

If Conservatives should win the most seats - but not a majority - they would probably try to form a government with the backing of Quebec's separatist Bloc Quebecois party. Trudeau's Liberals would likely rely on the New Democrats to stay in power.

Scheer is a career politician described by those in his own party as bland, a possible antidote for those tired of Trudeau's flash. Scheer, 40, calls Trudeau a phony who can't even recall how many times he has worn blackface.

Jason Kenney, Alberta's premier and a close friend of Scheer, calls the Conservative leader "an extremely normal Canadian" who is so nice he "can't fake being mean."

Scheer, however, has so relentlessly attacked Trudeau that Nik Nanos, a Canadian pollster, said he hasn't been himself.

"Scheer has been hostage to the message," Nanos said. "His campaign has made him into an attack machine."

Conservative supporters chanted "Lock him up! Lock him up!" at a rally Saturday after Scheer said he would investigate Trudeau's attorney general scandal - mirroring the Hillary Clinton "Lock her up!" chant popular at Donald Trump rallies. Scheer moved to calm the crowd and changed the chant to "Vote him out."

Trudeau embraced immigration at a time when the U.S. and other countries are closing their doors, and he legalized cannabis nationwide.

His efforts to strike a balance on the environment and the economy have been criticized by both the right and left. He brought in a carbon tax to fight climate change but rescued a stalled pipeline expansion project to get Alberta's oil to international markets.

His also negotiated a new free trade deal for Canada with the U.S. and Mexico amid threats by President Donald Trump to scrap it.

Scheer is promising to end the carbon tax and cut government spending, including foreign aid, by 25%.

"That money belongs to you, not to them," Scheer said.