OTTAWA — When Justin Trudeau, the prime minister of Canada, appeared at the United Nations this spring to sign the Paris climate accord, the rapturous ovation he received was worthy of the celebrity he had become, a leader full of promise and of promises, especially on climate change.

On Wednesday, as Canada convenes a North American Leaders’ Summit here, the youthful Canadian will meet the last celebrity to emerge to such adulation on the world stage, and President Obama will have some lessons to impart. Climate change will be a central topic of the summit meeting and of Mr. Obama’s address to Canada’s House of Commons.

The leaders of the United States, Mexico and Canada will announce a North America-wide climate partnership, syncing their national policies to cut greenhouse gas emissions. They will pledge a joint goal of generating 50 percent of North America’s electricity from zero-carbon sources by 2025, up from 37 percent today. White House officials said that power mix would include wind, solar, hydropower, nuclear energy and coal or gas power paired with carbon capture technology. They will also announce that Mexico will join an existing agreement between the United States and Canada to collectively regulate leaks of methane, a potent greenhouse gas that escapes from oil and gas wells.

But all of that will come with a note of caution. Unlike his Canadian counterpart, the American president’s hair is now gray, his speeches wizened by his experiences — and his message is likely to reflect the hard lessons he has learned as he has tried for nearly eight years to curb the climate-warming emissions of Canada’s neighbor to the south.

“Trudeau is facing the same fossil-fuel-lobby reality that Obama encountered,” said Paul Bledsoe, a former climate adviser in the Clinton administration who now consults on climate policy. “In a way, Canada is a test case for the penetration of renewable energy in a fossil-rich country.”

The parallels between the leaders are striking, even if the younger man’s efforts have only begun. During his first eight months in office, Mr. Trudeau, 44, has put climate change at the heart of his agenda, after his predecessor, Stephen Harper, a Conservative, reneged on Canada’s commitments under the first global climate pact, the Kyoto Protocol.

When President Obama, then new to office, attended the 2009 climate change summit meeting in Copenhagen, he too was cheered by environmentalists and many world leaders as a drastic departure from his predecessor, George W. Bush, a Texas oilman who had also pulled his country out of Kyoto.

But both have learned that adulation on the world stage does not necessarily translate into action at home on a problem as intractable as climate change.

After vowing in Copenhagen to make the United States a leader in the fight on global warming, Mr. Obama saw his climate change bill torpedoed in Congress. Only toward the end of his second term was he able to push through a climate policy that he had always thought of as a Plan B — a suite of regulations on coal-fired power plants — and those too are stalled, this time by a federal lawsuit.

Mr. Obama sees something of a kindred spirit in the prime minister.

“On the world stage, his country is leading on climate change and cares deeply about development, so from my perspective, what’s not to like?” Mr. Obama said of Mr. Trudeau during the prime minister’s state visit in March.

But on the smaller stage here in Canada’s capital, Mr. Trudeau is bumping up against the same opposing forces that stymied Mr. Obama in Washington.

Mr. Trudeau has acknowledged the difficulties. “Climate change will test our intelligence, our compassion and our will,” he told the United Nations in April. “But we are equal to that challenge.”

Canada’s economy relies heavily on oil and gas production, particularly in Alberta, where production of petroleum from the heavily polluting oil sands is a major source of government revenue, and the global collapse of oil prices has left the region suffering. Like Mr. Obama, Mr. Trudeau is experiencing pushback to efforts to reduce oil demand.

Image

The Syncrude oil sands plant outside Fort McMurray, Alberta. Canada’s economy relies heavily on oil and gas production, particularly in Alberta, where production of petroleum from the heavily polluting oil sands is a major source of government revenue.CreditIan Willms for The New York Times

It was Mr. Harper who submitted Canada’s climate change plan to the Paris negotiations, a plan widely criticized as weak. But for all his passionate speeches about climate change, Mr. Trudeau can offer an alternative only after he works out a new pact with Canada’s 10 provincial governments. So far, nothing has emerged.

“We were excited by Trudeau in Paris — he took an opposite stand from the previous government,” said Laurence Tubiana, the French climate change envoy. “But it’s not easy to make policies happen.”

Indirectly, just the election of Mr. Trudeau helped Mr. Obama carry out a major environmental decision, the rejection of the Keystone XL oil pipeline, which would have carried nearly a million barrels of oil from Alberta’s oil sands to Gulf Coast refineries. While American environmentalists begged him to reject the project, Mr. Obama delayed his decision for years in part to avoid straining relations with Canada.

Mr. Trudeau’s election in October 2015 changed the calculus. Although a Keystone supporter, the prime minister had put the pipeline much lower on his agenda than his climate change commitments. Less than a month after his election, Mr. Obama rejected the pipeline.

The first time Mr. Obama called Mr. Trudeau after a congratulatory election-night call was to give him a heads-up about his Keystone decision. But the call grew into a broader discussion on joint climate change plans. “That call could have gone very differently,” said Mr. Obama’s senior climate change adviser, Brian Deese. “But instead of acrimony, they both resolved that there was a real opportunity for our countries to increase our partnership on climate change.”

The two then met at the Paris climate summit meeting a month later. Then Mr. Trudeau set Canada’s bureaucracy into motion, appointing Catherine McKenna, an international trade lawyer, as his minister of environment and climate change.

“Catherine and her team were warmly welcomed. Her message was essentially, ‘Canada’s back,’” said Todd Stern, the former United States climate envoy.

But Mr. Trudeau’s push for a national plan to tax carbon emissions is still a matter of negotiation. Some provinces, including Alberta, Quebec and British Columbia, have put plans in place to tax or price emissions. Others have refused.

Brad Wall, the premier of oil-producing Saskatchewan, has vowed never to sign any carbon tax agreement.

Meanwhile, in the wake of Keystone XL’s failure, politicians from western Canada are pushing Mr. Trudeau to support new pipelines to the United States.

Rachel Notley, the premier of Alberta, said she believed Mr. Trudeau was warming to the idea. “He’s become more aware of what it means for our economy, what it means to reposition and get our product to market, and get a better price for our product,” she said.

And climate change remains a sensitive subject on both sides of the border. When the Canadian Green Party leader, Elizabeth May, linked a huge wildfire in Fort McMurray, Alberta, “to the global climate crisis,” she was rebuked by several other politicians, including Mr. Trudeau. Her comments were seen as a distasteful attempt to use the disaster for political purposes, a charge sometimes mirrored in the United States.

Still, support is growing for climate measures in Canada. Ontario, the most populous province, introduced a package of climate change measures earlier this month that included joining Quebec’s cap-and-trade system, which, in turn, is linked to California’s program.

Climate diplomats say that while Mr. Trudeau’s international celebrity will not be enough to push through tough domestic climate policies, it will not hurt.

“If you have Trudeau, who is a much more charismatic figure and gets press attention, then that amplifies what he says and gives a sense of momentum,” Mr. Stern said. “It’s a good thing.”

A version of this article appears in print on , Section A, Page 4 of the New York edition with the headline: Climate Partnership Is Key Topic at North American Leaders’ Meeting. Order Reprints | Today’s Paper | Subscribe