Justin Trudeau, the dashing son of political legend Pierre Trudeau, ushered in Canada’s first political dynasty with a stunning victory in national elections. But the incoming prime minister made clear Tuesday that he will chart his own path and introduce change after nine years of Conservative government.

A day after defeating Prime Minister Stephen Harper, Trudeau told President Obama by phone that he would make good on a campaign promise to withdraw Canada’s jets from the U.S.-led bombing campaign against the Islamic State in Iraq and Syria. Canada has committed a half-dozen fighter planes, a fraction of the American air power in the fight.

In other ways, though, Trudeau’s Liberal government may enjoy warmer relations with the Obama administration than Harper did.

Harper was skeptical of the Iran nuclear deal and disagreed sharply with Obama over the proposed Keystone XL pipeline from Alberta to Nebraska, which the U.S. president has opposed. While Trudeau also backs the pipeline, he said Tuesday that his government will seek a “broader relationship with the United States,” rather than one that “focuses on a single disagreement on a pipeline.”

The Obama administration had asked last year for Canadian participation in the air war against the Islamic State in Iraq, according to Canadian officials. Trudeau said Obama, in their phone call Tuesday, accepted his position.

“I committed that we would continue to engage in a responsible way that understands how Canada has a role to play in the fight against ISIL,” Trudeau said, using an acronym for the group. “He understands the commitments I’ve made around ending the combat mission.”

The White House, in a brief readout of the conversation, did not mention the planes. But a senior administration official, speaking on the condition of anonymity because of diplomatic sensitivities, said the two men talked about joint efforts to fight terrorism, including the threat posed by the Islamic State. “We expect Canada will continue to be a valuable contributor to the 65-member global coalition” against the group, the U.S. official said.

While reducing Canada’s combat role in the Islamic State campaign, Trudeau has promised to send extra military trainers to help develop Iraqi security forces, another U.S. focus in the region.

In many other ways, the new Canadian leader will set a different course from his predecessor. Trudeau has vowed to legalize marijuana, take in more Syrian refugees, be more active on fighting climate change, raise taxes on the wealthy and use deficit spending to improve infrastructure.

Trudeau, born in Ottawa on Dec. 25, 1971, grew up in the public eye, traveling the world with his father. He was the eldest of three sons born to Pierre Trudeau and the former Margaret Sinclair, who was three decades younger than her husband. The elder Trudeau was a public intellectual who served as prime minister from 1968 to 1979 and, after a brief break, from 1980 to 1984.

When Justin was 6, his parents divorced. Pierre Trudeau became a single father.

The elder Trudeau was a charismatic leader, bringing glamour and excitement to Canadian politics in the eyes of many voters. He dated celebrities, including Barbra Streisand; was photographed sliding down banisters; and pirouetted when Queen Elizabeth II’s back was turned.

The younger Trudeau seemed to spend much of this year’s grueling 78-day campaign trying to distance himself from his father. Tuesday, at his first news conference as prime minister-elect, he told reporters that he thought about his father when he was elected to Parliament in 2008. But after his victory Monday night, his mind was more focused on forming a new government, he said.

“My thoughts must be rooted in the needs and future of the country. I think that is what my father would have liked me to do at this time,” he said.

Trudeau’s surprise victory came just weeks after polls showed his Liberal Party running third, behind Harper’s Conservatives and Thomas Mulcair’s center-left New Democratic Party (NDP).

Mulcair and Harper taunted the athletic Trudeau, 43, in campaign ads that called him “Justin” and made fun of his “nice hair.” Critics said the former schoolteacher was too young and inexperienced to be prime minister.

Trudeau benefited from many Canadians’ fond memories of his father, analysts said. But he also ran a tireless campaign based on change and optimism at a time when many frustrated voters wanted “anyone but Harper.” The Conservative prime minister, 56, who was seeking a fourth term, was accused by critics of being autocratic and out of touch with Canadian values on environmental issues, race and immigration.

The Conservatives also were hurt by recent political scandals, including one involving a senator on trial over fraud suspicions.

“Two-thirds of Canadian voters said the Conservatives lost the moral authority to govern,” said Nelson Wiseman, director of the Canadian Studies Program at the University of Toronto. “The election revolved around one issue: Do you want to keep the government of Harper or not?”

Harper had called in August for the election, thinking a longer campaign and a bigger Conservative Party budget would wear down the Liberals and the NDP. Very few predicted a Liberal victory. But days before the election, polls showed a Liberal surge. The party wound up capturing 184 seats, enough to form a majority government.

Trudeau will be Canada’s ­second-youngest prime minister. The youngest was Joe Clark of the Progressive Conservative Party, who took office in 1979, a day before his 40th birthday.

During his Monday night victory speech, delivered in French and English, Trudeau told a cheering crowd in Montreal that his campaign had used an old-fashioned political strategy.

“We met with and talked with as many Canadians as we could,” he said. “We won this election because we listened. . . . You told us it is getting harder and harder to make ends meet and to get ahead. You told us you were concerned about your retirement. . . . I am not the one who made history tonight. You are.”

Not once during the nearly 30-minute speech did he mention his father by name. Under Pierre Trudeau, Canada officially became a bilingual country. The elder Trudeau pushed for multiculturalism, a constitutional bill of rights known as the Charter of Rights and Freedoms, and the end of provisions that gave the British Parliament a say in Canada’s laws and constitution.

Justin Trudeau’s critics say he could never compare to his father.

“Almost everybody looks like an intellectual lightweight compared to Pierre Trudeau,” said Elise Chenier, a history professor at Simon Fraser University in British Columbia.

Justin Trudeau graduated with a bachelor of arts in literature from McGill University in 1994 and later earned a degree in education at the University of British Columbia. He taught school from 1999 to 2002, giving classes in drama, French, English and social studies. He also worked as a nightclub bouncer and a snowboarding instructor.

Some say he was not interested in politics in his younger years. But in 1998, his brother Michel died in an avalanche. And in 2000, his father died from prostate cancer. Justin Trudeau’s televised eulogy at his father’s funeral propelled him once again before the public, and some Canadians began quietly speculating that perhaps one day he, too, would be a political leader.

Trudeau told the crowd at the funeral that his father taught his three sons to believe in themselves, to stand up for themselves and to have passion for life.

“We knew we were the luckiest kids in the world. And we had done nothing to actually deserve it. It was instead something we would have to spend the rest of our lives to work hard to live up to.”

In 2008, Trudeau defeated a Bloc Québécois incumbent to win in the “riding,” or electoral district, of Papineau, one of the poorest in Canada. In April 2013, he was elected leader of Canada’s Liberal Party.

Days later, Harper released an attack ad saying that Trudeau was in “way over his head.”

Some analysts have compared Trudeau to Obama, because of his youth and his campaign message of hope and change.

Trudeau said that in his conversation Tuesday with the American president, “he teased me about my lack of gray hair, and said I would soon get some like him.”

Steve Mufson contributed to this report.

Read more:

Canada’s election has taken less than three months. Canadians can’t wait for it to end.

How a Muslim veil is dominating Canada’s election race

Today’s coverage from Post correspondents around the world