MONTREAL — Prime Minister Justin Trudeau of Canada has crisscrossed his vast country from the Pacific to the Atlantic coasts, and all the way up to the Arctic, shaking hands, cradling babies and posing for his signature selfies — sometimes doing all three at once.
Along the way, his campaign for re-election became an apology tour after it was revealed that as a young man he had dressed in blackface and brownface.
The racist caricatures were damaging enough, but for Mr. Trudeau they also seemed to validate a troubling critique of his character: His critics have long said his liberal image was merely a politically expedient veneer.
He is an environmentalist, who, they point out, bought a pipeline.
He is a self-declared feminist who was accused of bullying his own female attorney general.
Now, with Canadians voting in a national election on Monday, the question hanging over Mr. Trudeau is: Will voters forgive him? Will they choose him even if he has not always been the leader they hoped for?
“He’s a hypocrite,” said Ève Gaboury, 19, who studies environmental geography at Université de Montréal. She said she could forgive the blackface, but never the pipeline.
Mr. Trudeau swept into power four years ago in a surprise victory, becoming a global symbol of liberalism even as right-wing populism took hold in many other democracies. He drew young supporters by presenting himself as a champion of women and Indigenous people, and committed to the fight against global warming.
His government made a splash early on, unveiling one of the most gender-balanced cabinets in the world, legalizing recreational marijuana and welcoming more than 25,000 Syrian refugees.
He also successfully navigated a mercurial American president and clinched a sweeping trade deal with the United States. Under his watch, the Canadian economy is buoyant.
But his vow to bring a different “sunny” approach to politics was undercut earlier this year by his intervention in a criminal case involving a major Canadian engineering company.
Mr. Trudeau said he was trying to save jobs by pressing his attorney general and justice minister, Jody Wilson-Raybould, to ask for a civil penalty instead of pursuing the criminal prosecution. But Ms. Wilson-Raybould, who is Indigenous, accused Mr. Trudeau and his mostly male aides of improperly pressuring her, and said she felt bullied.
A federal ethics commissioner ruled that Mr. Trudeau broke a conflict of interest law.
Much of the public echoed its dismay: Here was a leader who promised a new, honest, open approach to governing, inserting politics into a criminal case.
That was troubling to many, and damaged his image, but that was not all.
Earlier in his tenure he had used 4.5 billion Canadian dollars in government money, or about $3.4 billion, to buy a pipeline connecting Alberta’s oil sands to the Pacific Coast. The purchase riled many environmentalists, who said he was more concerned about Canada’s energy industry than about the environment.
He also took his family on a state visit to India, where they all dressed in sumptuous local garb. It may have been intended as good-natured but instead appeared culturally insensitive and became an exercise in national cringing.
Then there were the old images of him in dressing up in brownface or blackface face at least three times — including in a video in which he is seen wearing an Afro wig and sticking his tongue out.
“I’m sorry I hurt people,” Mr. Trudeau recently told young twin black girls in one of his many public apologies during the campaign.
All of this might prove too much for Mr. Trudeau to overcome.
With an approval rating at about 35 percent, half of what it was during his first full year in office, he finds himself in a close race as Canadians choose their new Parliament. Experts say he faces the possibility of becoming a one-term prime minister or, with low turnout, ending up governing with a potentially unstable minority government.
Throughout the campaign, Mr. Trudeau’s Liberal Party has been tied with its main opponent, the Conservatives, led by Andrew Scheer, although several analysts said that over the weekend, there was a slight shift in Mr. Trudeau’s favor.
On the left, Mr. Trudeau’s party is challenged by the New Democratic Party and the Greens.
Mr. Trudeau is pushing back, and not merely by apologizing. He is also emphasizing his liberal agenda, and arguing that, if elected, the Conservatives will wipe away the progress the Liberals have made.
“We recognize there’s much more to do for all the 900,000 people we’ve lifted out of poverty, there are more people who need help,” the 47-year-old Mr. Trudeau said last week in Fredericton, New Brunswick.
“Now is not the time to turn back,” he said.
Despite his difficulties, Mr. Trudeau — toasted as “the future prime minister of Canada” by Richard Nixon at a state dinner with his father when he was only a few months old — still has star power.
He has attracted large crowds throughout the campaign. These have included the Instagram-ready moments he is so adept at creating, like when he paddled up in a canoe before a campaign event in Sudbury, Ontario.
On another recent day, as he left a suburban Toronto hotel to begin a day of campaigning, suddenly, the cook, who was preparing eggs at the breakfast buffet, rushed out for a selfie with Mr. Trudeau. Soon, others joined in, including a businessman who had been waiting to check in. Nearby, a group of star-struck tourists from China took photos.
Mr. Trudeau’s image as an effective spokesman for Canada on the global stage was burnished last week when President Barack Obama, who was hugely popular in Canada during his presidency, endorsed Mr. Trudeau’s re-election on Twitter, touting the prime minister as a progressive leader “the world needs.”
But a campaign cannot erase the record — personal and professional — that has raised questions about his character.
“The fact of the matter is, he’s always wearing a mask,” said Mr. Scheer, the Conservative leader, in a recent debate, mocking Mr. Trudeau for saying he could not remember how many times he had worn blackface.
At a news conference the morning after the old photos emerged, a contrite Mr. Trudeau said his dressing up like that partly reflected his former life of privilege, which came “with a massive blind spot.”
And while Mr. Trudeau has been praised for putting reconciliation with Indigenous people at the top of the national agenda, some Indigenous people complain he hasn’t delivered on his promises.
Chief Rudy Turtle, leader of a northern Ontario First Nation plagued by mercury contamination, said Mr. Trudeau’s Liberals had failed to live up to their promises to his people to build a water treatment plant. He is now running for the left-leaning N.D.P.
“Every time there’s a disaster somewhere else, Trudeau is throwing money to other countries and not doing anything in his own backyard,” he said.
It seems that many Canadians are not quite prepared to forgive Mr. Trudeau for sometimes letting them down.
But they also do not seem too enthusiastic about the alternatives, which may be why in the end he could win a second term.
Canadians haven’t warmed to Mr. Scheer, 40, a career politician who has struggled to define what he stands for beyond cutting taxes, and is out of sync with much of Canada on social issues. He is anti-abortion and has made disparaging comments about gay marriage.
“Mr. Scheer has explained to Canadians why they shouldn’t vote for Justin Trudeau but never explained why people should vote for him,” Mr. Léger said.
On the left, the N.D.P.’s unabashed leftist policies on socialized health care and taxation have compromised Mr. Trudeau’s effort to portray himself as the best guarantor of social equality. And the party’s charismatic leader, Jagmeet Singh, the first nonwhite to lead a major national party, has seen his personal popularity rise over the past week.
But it may be too little, too late.
Mr. Trudeau’s image problems are not all of his own making. He is running in the shadow of his father, Pierre Elliott Trudeau, one of Canada’s most celebrated prime ministers.
It is a reality he has never been able to outrun, but seems at peace with.
“He’s had to deal with the prejudice that he’s a lightweight, that he’s not his dad, since he was 12 or 13 years old,” said Marc Miller, a member of Parliament for the Liberal Party and a close friend of Mr. Trudeau’s from high school. “He learned early on not to be afraid of his name.”
Dan Bilefsky reported from Montreal. Ian Austen reported from Ottawa. Brandi Morin in Edmonton contributed reporting.