OTTAWA -- Former U.S. president Barack Obama is urging Canadians to re-elect Liberal Leader Justin Trudeau.

In a message on Twitter, Obama says the world needs progressive leadership and he hopes Canadians will give Trudeau another term as prime minister.

Obama says that while he was president he was proud to work with Trudeau and calls him a hard-working, effective leader who has taken on major issues like climate change.

The former president's message lands with less than a week left in Canada's federal election campaign.

Trudeau and Obama quickly developed a close friendship after the Liberals won the 2015 election - and they appear to have maintained their bond even after the end of Obama's second presidential term in January 2017.

They had dinner together last spring at an Ottawa-area restaurant while Obama was in the capital to headline a speaking event in front of more than 11,000 paying attendees.