Canada's new leader will end his country's involvement in US-led air strikes on the Islamic State (IS) group in Iraq and Syria.
The stunning victory of Justin Trudeau is reverberating beyond Canada's borders after the Liberal Party leader emphatically ended a decade of rule by the most conservative leadership in the country's history.
As well as the air strikes, other areas in which Mr Trudeau differs from his predecessor Stephen Harper are climate change, immigration and whether relations with the US should hinge on the future of the Keystone XL oil pipeline.
Mr Trudeau said he spoke to Barack Obama and told him he would remove Canada's six fighter jets from the bombing campaign in Iraq and Syria.
Speaking at a rally in Ottawa, the Mr Trudeau, 43, the son of Pierre Trudeau, one of Canada's most dynamic politicians, underlined the sea change.
"I want to say this to this country's friends around the world: many of you have worried that Canada has lost its compassionate and constructive voice in the world over the past 10 years. Well, I have a simple message for you on behalf of 35 million Canadians. We're back," he declared.
With Mr Trudeau's decisive victory, Canadian voters reclaimed their country's liberal identity, giving the new prime minister a commanding majority in parliament that will allow him to govern without relying on other parties. That means change in Canadian policies on a broad spectrum of issues.
"Trudeau will return Canada to its traditional approach in foreign affairs which is characteristic of every single government but Harper's," said Robert Bothwell, a professor at the University of Toronto.
"Canada will go back to multilateralism, back to strong support for the United Nations."
There will be a "new way for Canada to be on the world stage", said Liberal MP Marc Garneau, who won re-election.
Mr Trudeau channels the star power - if not quite the political heft - of his father, who swept to office in 1968 on a wave of support dubbed "Trudeaumania" and governed for most of the next two decades.
Tall and trim, he is a former teacher and member of parliament since 2008. He becomes the second youngest prime minister in Canadian history and has been likened to Mr Obama.
"The whole tone of the US-Canada relationship will change. Philosophically Obama and Trudeau are much closer," Prof Bothwell said.
The White House said Mr Obama called to congratulate Mr Trudeau and the two leaders "committed to strengthening the countries' joint efforts to promote trade, combat terrorism and mitigate climate change".
Mr Obama "also teased me about my lack of grey hair, but said I'd probably get some quite soon", dark-haired Mr Trudeau quipped later.
Mr Trudeau's victory will probably improve ties with the United States, at least for the remainder of Mr Obama's presidency. Mr Harper was frustrated by Mr Obama's reluctance to approve the Keystone XL pipeline from Alberta to Texas and clashed with the president on other issues, including the Iran nuclear deal.
Although Mr Trudeau supports the Keystone pipeline, he argues that relations should not hinge on the project.
"Theoretically, Justin is for Keystone, but he can obviously jettison that," Prof Bothwell said of the project, opposed by Democratic presidential hopeful Hillary Clinton. Republican contenders back the scheme.
Antonia Maioni, a political science professor at McGill University, said the Obama administration would welcome the change in government.
"Even on Keystone, Mr Trudeau says he supports it, but he is not going to make it an issue of conflict with Obama," she said.
Still, there are differences that could lead to friction with the US, including the decision to remove the jets from the campaign against IS. Mr Harper had said such a move would hurt relations with the US.
But Mr Trudeau said the US president understood his commitment to end Canada's involvement in the combat mission.
Mr Trudeau has also vowed to take in 25,000 Syrian refugees by the end of the year. Mr Harper declined to resettle more Syrian refugees despite the haunting image of a drowned three-year-old boy's body washed up on a Turkish beach after his family's failed attempt to immigrate to Canada.
Canada shifted to the centre-right under Mr Harper, who lowered sales and corporate taxes, avoided climate change legislation, strongly supported the oil and gas extraction industry and backed the right-wing government of Israeli prime minister Benjamin Netanyahu.
Mr Trudeau will have a more balanced approach to the conflict in the Middle East, analysts said.
Trudeau has also vowed to consult the premiers of Canada's provinces in an effort to come up with a plan ahead of the Paris climate talks in November.
Under Mr Harper, Canada pulled out of the Kyoto Protocol, the emissions reduction programme for rich countries, and the Conservative leader was perceived by environmentalists as more interested in protecting Canada's oil-rich region of Alberta - which has the third-largest oil reserves in the world - than efforts to stem the effects of climate change.
"Canada's days of being a less-than-enthusiastic actor on the climate-change file are behind us," Mr Trudeau said in Ottawa.
Nelson Wiseman, a political science professor at the University of Toronto, said Canadian diplomats are delighted at Trudeau's election because Mr Harper never let them speak without checking with the government first.
"They've been totally marginalised. They've been told, 'We don't care what you think'," Prof Wiseman said.
Mr Harper, whose near 10 years as prime minister makes him one of the longest-serving Western leaders, will step down as Conservative leader after the crushing defeat.