Image copyright Adam Scotti / Prime Minister's Office

Barack Obama has enjoyed a rare tête-à-tête with Canada's Prime Minister Justin Trudeau in Montreal.

The duo dined at trendy Liverpool House on Tuesday when the former US president was in town for a speaking engagement.

The pair have a storied bromance, which began when Mr Trudeau visited the White House for a state dinner last year.

Mr Trudeau, who once called Mr Obama his "sibling", tweeted that they discussed getting young people "to take action in their communities".

Image copyright Instagram

The Obama Foundation also tweeted that the two had discussed their "shared commitment" to youth leadership.

Mr Obama was in town to give a speech at the Palais des congrès hosted by the Montreal Chamber of Commerce. The event was sold out, with reports of tickets being resold online for hundreds of dollars.

During his speech, Mr Obama commended the Paris climate agreement and expressed disappointment that the US has withdrawn.

"In Paris, we came together around the most ambitious agreement in history to fight climate change," he said. "An agreement that even with the temporary absence of American leadership will still give our children a fighting chance."

But it wasn't all business for the busy former president, who took time to have dinner with the Canadian prime minister.

Image copyright Twitter

Mr Trudeau and Mr Obama's friendship has been heralded as one of the great "bromances" of our times, inspiring everything from Twitter memes to fan fiction.

Image copyright Adam Scotti / Prime Minister's Office

Restaurant owner David McMillan told the CBC that the pair seemed jovial at dinner, which included oysters, shrimp, halibut, steak, spaghetti lobster and strawberry shortcake. The restaurant is a favourite of Mr Trudeau's, who is from Montreal and represents the district of Papineau.

But while the pair were cool and collected inside, outside it was mayhem with about 200 security guards and a street packed with onlookers.