ROME — President Biden sought to reverse key policies and approaches of former president Donald Trump during this weekend’s summit of the Group of 20, and attempted to ensure those reversals would stay in place even if there is a change in American leadership.

Biden lifted steel and aluminum tariffs enacted by Trump that had caused friction between the U.S. and the European Union. He huddled with allies on how to reinvigorate talks aimed at preventing Iran from securing a nuclear weapon, which the last administration had abandoned. He forged an agreement aimed at ensuring corporations pay more taxes.

And he struck a deal with other nations to end government funding of new coal-fired power plants, part of a broader agenda to curtail climate change and reclaim international leadership on a topic Trump eschewed.

“The United States of America is the most critical part of this entire agenda,” Biden said at a Sunday news conference, responding to a suggestion that the U.S. return to global leadership remains in doubt. “Everyone sought me out. Everyone wanted to know what our views were.” Biden spoke at La Nuvola, an airy building in a complex outside the heart of the city that housed the meeting of the world’s major economic powers.

But as Biden sought to showcase his leadership on the global stage, the president’s standing at home has grown more precarious, with Trump sending increasingly stronger signals that he will seek the White House again.

Just 42 percent of Americans approve of the job Biden is doing, according to a new NBC poll. One of his political allies is struggling in what was expected to be an easy victory in a gubernatorial race in Virginia. Biden has so far been unable to pass his legislative agenda, though he hopes that will happen this week.

In Rome, Biden downplayed his falling approval ratings. “The polls are going to go up and down and up and down,” he said.

But Biden’s top advisers acknowledged that world leaders approached the talks with a concern that Trump, or a figure similarly dismissive of U.S. allies, could return to power in 2024 or after.

“Our allies believe that we have to lock in progress as much as possible while there is a president who is a deeply committed transatlanticist in office,” said a senior administration official, speaking to reporters in Rome on Saturday evening. The official was not authorized to speak publicly.

That meant enshrining the policy changes in formal pacts and high-profile deals as much as possible.

Some of the leaders said the weekend meeting, which comes in advance of a major climate summit this week, helped reestablish a multilateral system that had been broken in recent years.

“We have a common ambition now, which we didn’t have before,” said Italian Prime Minister Mario Draghi as the summit concluded.

Still, several key leaders did not attend the conference in person, which Biden called a “disappointment.” They included Chinese leader Xi Jinping, Russian President Vladimir Putin and Saudi Arabia’s Crown Prince Mohammed bin Salman.

Biden framed some of the agreements on the global stage as intended to solve U.S. domestic problems, part of his overarching goal of a “foreign policy for the middle class.”

That included a meeting Sunday on the global supply chain, saying the measures adopted would ease the flow of goods to American shelves.

“Supply chain is something that most of our citizens never think twice about unless something goes wrong,” Biden said. “Even as I’ve been here in Rome, as you might guess . . . I’ve been focused on the vital issues that affect American workers and families at home.”

When he described his decision to lift tariffs, a move that some labor groups have argued against, Biden went out of his way to note that he was staying in touch with American union leaders.

The president telephoned the head of the United Steelworkers as he was finalizing the decision to lift some of the metal tariffs that have protected union jobs, he said.

Still, tensions were sometimes evident between Biden’s wider global agenda and the demands of politics at home — particularly on climate change, a topic that the president views as key to his legacy.

Biden’s team touted that the president is working with other leaders to press oil-producing countries to increase supply. That appears to contradict the message Biden plans to deliver Monday in Glasgow, Scotland, at a highly anticipated climate summit, where he’ll ask countries to curb emissions and argue for major cuts in fossil fuels.

“On the surface it seems like an irony,” Biden said when asked about the two priorities. “It does on the surface seem inconsistent.” But he said no one expects fossil fuels to disappear overnight, and in the short term he is focused on preventing high energy costs from hurting American workers.

“They have to get to their work. School buses have to run,” Biden said. He added, “The idea that there’s an alternative to walk away from being able to get in your automobile, it’s just not realistic.”

The frank assessment of the trade-offs between domestic realities and climate ambitions underscores the difficulties that Biden and other world leaders face in cutting emissions. That reminder comes at a particularly awkward time, since the summit in Rome was intended to set the tone for the COP26 climate summit in Glasgow.

Activists and national leaders hope the Glasgow meeting will be a milestone in stemming the consequences of a warming planet that are already being felt on every continent: melting glaciers, record floods, deadly heat waves, and most recently, widespread food shortages in Madagascar, in what could become the first climate-driven famine.

Leaders of the world’s largest economies did reach an agreement to halt the public financing of coal-fired power plants abroad by the end of this year. But they did not set a target for ending coal use domestically, which climate activists say is needed as part of an effort to stave off catastrophic warming of the planet.

In backing away from such action, the world’s industrialized countries, which are also the largest greenhouse gas emitters, were prolonging a pattern that has put the world on a dire trajectory with little time to reverse course, experts said.

“The bare minimum,” Claire Fyson, co-head of the climate policy team at Berlin-based Climate Analytics, said of the G-20 deal.

António Guterres, the secretary general of the United Nations, said on Twitter that he was leaving Rome with hopes “unfulfilled.”

“But at least they are not buried,” he wrote. “All countries need to realize that the old, carbon-burning model of development is a death sentence for their economies and our planet.”

Alex Scott, who follows climate diplomacy for the energy think tank E3G, said the G-20 deal at least shows that wealthy countries are now in agreement about the danger of failing to act.

“It does set leaders up with an expectation that they’ll come to the Glasgow COP and put some meat on the bones,” she said.

Biden, in his remarks Sunday, made it clear that his time in Rome included poignant moments that went beyond his challenges at home and abroad.

He spoke emotionally about his Friday meeting with Pope Francis, his voice breaking as he recounted to reporters how the current head of the Catholic church comforted his family after the death of his son, Beau, in 2015.

Biden, the second Catholic to be president, said he finds “real solace” in his relationship with Pope Francis, with whom he shares progressive values on issues such as climate change.

“He came in and talked to my family for a considerable amount of time, 10 or 15 minutes, about my son Beau,” Biden recounted of the pope’s visit to the U.S. six years ago, when he said the wounds were still raw following Beau’s death. “He didn’t just generically talk about him — he knew about him, he knew what he did, he knew where he went to school. . . . It meant a great deal.”