Barack Obama has urged Canadians to re-elect Prime Minster Justin Trudeau.
The intervention is an apparently unprecedented endorsement of a candidate in a Canadian election by a former US president.
Mr Obama tweeted on Wednesday that he was proud to work with Trudeau and described him as a hard-working, effective leader who takes on big issues such as climate change.
“The world needs his progressive leadership now, and I hope our neighbours to the north support him for another term,” Mr Obama wrote.
Mr Trudeau later responded with his own tweet: “Thanks my friend, we’re working hard to keep our progress going.”
He is in a tough re-election fight in Monday’s parliamentary elections.
Robert Bothwell, a professor of Canadian history and international relations at the University of Toronto, said that might have something to do with Mr Obama’s intervention.
“Trudeau is in real danger,” Mr Bothwell said. “If I were a Liberal (Party) campaigner I would quietly point with pride to Mr Obama’s endorsement. I don’t know if I’d run around toting it as a major political issue.”
Mr Bothwell said you would have to go back more than 100 years to find an American president intervening in a Canadian federal election.
He said former US President Theodore Roosevelt, who was president from 1901 to 1909, visited Toronto in 1917 when Canada was having an election about conscription and spoke in favour of it. But Mr Bothwell said he did not know how explicit he was.
Nelson Wiseman, a political science professor at the University of Toronto, called Mr Obama’s endorsement rare and said it possibly has not happened before but he does not think it will move the polls.
“In fact, some people may feel this is an unwarranted foreign intrusion in Canada’s election,” Mr Wiseman said.
Mr Obama also endorsed Emmanuel Macron for president in France’s 2017 election, and he warned British voters against voting to leave the European Union.
Mr Trudeau formed a close relationship with Mr Obama when he was president and the two were pictured having dinner in Ottawa earlier this year.
The former president has long been popular with many Canadians. Mr Trudeau’s Liberal Party posted Mr Obama’s message into a party fundraising pitch that was emailed directly to potential donors
Mr Trudeau’s rival, Conservative leader Andrew Scheer, said that he is “not very interested what former foreign leaders are saying.” He said he would let Canadians judge whether Mr Obama’s endorsement is appropriate.