OTTAWA -- Former U.S. president Barack Obama has waded into the Canadian election, offering an unusual cross-border endorsement of Liberal Leader Justin Trudeau with five days left in the campaign.

“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,” said Obama in a tweet sent Wednesday.

With photos emerging in this campaign of Trudeau wearing blackface and brownface, the Liberal Leader’s reputation as a progressive leader on the world stage has taken a hit.

This backing from a major international figure was embraced by the Liberals as a welcome message that will reach progressive voters in Canada, a key bloc Trudeau is still pushing to lock down by Oct. 21, amid an NDP surge in the polls.

In response, Trudeau thanked Obama, whom he called his “friend,” and said he was ‘working hard to keep our progress going.”

Within two hours of the tweet being sent the Liberal Party was fundraising off of it. “You’ve probably seen the news,” the email intended for party supporters begins, before showing Obama’s message and stating “we couldn’t agree more,” followed by a request to make an “urgent campaign donation,” to help the Liberals win.

Trudeau and Obama had a strong working relationship when Obama was president, and the pair have remained friendly since, publicizing their social outings in recent years, including just months before the election was called at an Ottawa brewery when Obama was in town for a speaking event hosted by the Liberal-linked Canada 2020.

Obama invited Trudeau to a star-studded state dinner at the White House in 2016. It was the first U.S. state dinner held for a Canadian prime minister since 1997, and Obama made a toast to “the friendship between Americans and Canadians.”

Months later, Obama visited Canada and addressed the House of Commons. His speech was largely seen as a passing of the torch before Obama left office, saying the world “needs more Canada.”

Minutes after it was posted, a spokesperson for U.S. President Donald Trump’s 2020 reelection campaign called it “foreign election interference,” but according to Elections Canada, “all individuals, Canadian or non-Canadian, are free to express their views on any topic during an election."

In a statement the elections body said that a foreign citizen speaking about the Canadian election doesn't  "constitute an instance of undue foreign influence under the Canada Elections Act," and that factors considered before determining if "undue foreign influence" has taken place would include who incurred expenses and for what reason.

Canadian Conservatives also met the former U.S. president’s message with skepticism.

“I await a response on the Obama tweet from the federal government's rapid response team on foreign interference...” tweeted Ian Brodie, who was former Conservative prime minister Stephen Harper’s chief of staff.

Brodie was referring to one of the several new measures put in place by the Liberal government, aimed at further shoring up Canada's electoral system from foreign interference.

Called the "Critical Election Incident Public Protocol," the panel of senior public servants are responsible for deciding when and how to inform Canadians about concerning behaviour or content that comes to their attention. As of Wednesday, the panel has not come forward with any potential meddling efforts.

Liberal Party spokesperson Zita Astravas said the Liberal Party did not pay for this endorsement, but has not yet confirmed whether the party had asked for the support or was aware that it was coming.

When asked about the post at a campaign stop in Hamilton late Wednesday, Conservative Leader Andrew Scheer said he was focused on what voters have to say about the campaign.

“I’ve got millions of Canadians, like the ones here tonight, behind me,” he said. “I’m not very interested in what former foreign leaders are saying. I’m just focused on finishing this election strong and putting forward my plan to help Canadians get ahead.”

Green Party Leader Elizabeth May said she was “surprised that any former U.S. president would endorse or engage in Canadian politics. Clearly we remember the ‘bromance’ … but I think it’s important for Canadians to decide who forms government.”

Polls suggest the election will come down to a tight race between the Liberals and the Conservatives. It was revealed during the campaign that Conservative Leader Andrew Scheer holds dual Canada-U.S. citizenship but is in the process of renouncing his American citizenship.

With files from Writer Ben Cousins