Prime Minister Justin Trudeau and Barack Obama met at a restaurant Tuesday night following the former U.S. president's speech to the Montreal Board of Trade.
Trudeau tweeted a picture of the pair talking in a west-end eatery.
"How do we get young leaders to take action in their communities? Thanks @BarackObama for your visit & insights tonight in my hometown," the prime minister tweeted.
In his speech, Obama once again decried what he called the lack of American leadership on climate change, saying Tuesday his country's absence as an international force on the issue is only temporary.
He did not mention U.S. President Donald Trump by name but clearly targeted his successor's decision to pull the United States out of the Paris climate change accord.
"In Paris, we came together around the most ambitious agreement in history to fight climate change," Obama said. "An agreement that even with the temporary absence of American leadership will still give our children a fighting chance."
He said states such as California continue to give prioriity to reducing emissions despite the decisions of the current White House.
"If you want to continue selling cars in California, you will still have to look at emission standards that we set even if they aren't as rigorously promoted by this current administration," Obama told a crowd of 6,000 people, including Premier Philippe Couillard, former premier Jean Charest and a slew of high-profile business executives.
The former president, who was on his first visit to Canada since leaving office, also seemed to take a dig at Trump when he discussed the current age of instant information.
"Where TV and Twitter can feed us a steady stream of bad news and sometimes fake news, it can seem like the international order we have created is constantly being tested and the centre may not hold," he said.
Obama used the words "international order" several times, recalling the post-Second World War system created by countries such as the United States and Canada that still exists to this day but that he said is being tested.
His speech fell on the anniversary of D-Day, when the United States and allies such as Canada invaded the beaches of northern France on June 6, 1944, and helped to create an international system he said was based "not just on self-interests but on principles."
Again not mentioning Trump directly or any leader of far-right movements in Europe, Obama said forces of nationalism and economic uncertainty created by technological advances are causing people to look toward "strong men."
"And in some cases, that leads people to search for certainty and control and they can call for isolationism or nationalism or they can suggest rolling back the rights of others," he said.
"Or simply they can try to retreat and suggest we have no obligations beyond our borders, or beyond our communities, or beyond our tribe — that what's good for me and my immediate people is all that matters, that everyone else is on their own."
Obama said that while such instincts of retrenchment are understandable and tempting, they must be avoided.
"History also shows there is a better way," he said. "Canada shows, the United States, Europe, Japan show it is possible for us to overcome our fears and to reach across our divides."
He said the values of the world's western democracies created after the Second World War have been sometimes hypocritical due to the lack of rights offered at times to certain groups as well as the inequality that continues to exist.
But the advances created by this international system are based on shared values that have been "built steadily over the course of 70 years."
Obama, the 44th president, was warmly welcomed on his first trip to Montreal and the thousands who attended were asked to show up two hours before he spoke.
The cheapest tickets went for $57, while the most expensive was $373.