French President Emmanuel Macron on Wednesday delivered an impassioned call for multilateralism and U.S. engagement in the world, saying it was “an essential part of our confidence in the future.”

Speaking to a joint meeting of Congress, amid frequent standing ovations and cheers, Macron recalled the long history of U.S.-French relations, and the countries’ shared values and culture in areas as diverse as democracy and freedom, human and civil rights, literature, jazz and the “Me Too” movement.

But, he warned, “this is a time of determination and courage. What we cherish is at stake. What we love is in danger. We have no choice but to prevail. And together we shall prevail.”

Much of what he said, although couched in stirring and global terms, posed a direct challenge to the Trump administration and to the U.S. president with whom Macron has said he has a special relationship.

Macron expressed hope that the United States would reenter the Paris climate accord, which President Trump exited early in his administration.

“Some people think that securing current industries and their jobs is more urgent than transforming our economies to meet the challenge of global change,” he said. “I hear . . . but we must find a transition to a low-carbon economy. What is the meaning of our life, really, if we work and live destroying the planet, while sacrificing the future of our children?”

Macron also called for resolving of trade disputes through negotiation and the World Trade Organization, indirectly criticizing Trump’s imposition of tariffs. “I believe we can build the right answers . . . by negotiating through the WTO and building cooperative solutions,” he said.

“We wrote these rules,” he said. “We should follow them.” France and the European Union are seeking exemptions from steel and aluminum tariffs due to be imposed May 1.

More broadly, the free world needed to “push aside” the forces of “isolationism, withdrawal and nationalism,” Macron said, and to “shape our common answers to the global threats that we are facing” with an updated multilateralism, lest the post-World War II institutions that “you built,” including the United Nations and NATO, be destroyed.

“This requires more than ever the United States’ involvement, as your role was decisive in creating and safeguarding the free world. The United States is the one who invented this multilateralism; you are the one who has to help to preserve and reinvent it,” he said.

On Iran, he repeated his support for the nuclear deal, even as he outlined a four-part “comprehensive” strategy to address upheaval in the Middle East, even if Trump opts out of the agreement.

“Our objective is clear. Iran shall never possess any nuclear weapons,” he said as the chamber rose with applause. “Not now. Not in five years. Not in 10 years. Never.”

“But this policy should never lead us to war in the Middle East,” he said. “Let us not replicate past mistakes. . . . Let us not be naive on one side. . . . Let us not create new wars on the other side.”

“There is an existing framework, the JCPOA [Joint Comprehensive Plan of Action] to control the activity of Iran. We signed it, at the initiative of the United States. We signed it, both the United States and France. That is why we cannot say we should get rid of it like that.”

Trump, who has called the agreement “the worst deal” in history and has said he will determine by May 12 whether to withdraw the United States from it, will have to make his own decision, Macron said.

“But what I want to do . . . is work on a more comprehensive deal” that would address Iran’s ballistic missile program and its expansionism in Yemen, Lebanon, Iraq and Syria, as well as its nuclear program, he said.

In a solo news conference before his return home Wednesday night, Macron said that he was under no illusions about Trump’s views on the Iran deal. “I don’t know what his decision will be, but a rational look at . . . comments he has made . . . indicate to me he will not do his utmost to preserve it,” he said. While he was still “advocating” retention of the deal, he said, “I’m not a masochist.”

Asked how he could say he was “extremely pleased” about his three-day visit here and praise his warm relationship with Trump while outlining positions opposite to those of the U.S. president on climate, trade and a host of other issues, Macron said: “I think it’s life. It’s the same thing in all families.”

“Let’s share the disagreements. I don’t see it in my interest, in French interests, to just say, ‘I disagree and I don’t want to speak with you.’ It’s ridiculous,” he said. “It’s best to say we’ve been partners for a long time; we are allies.” He would push his own ideas, Macron said, and hope that the “strong relationship” could help in reaching shared objectives.

Media coverage, and comments from the opposition and even from within his own party, in France, where Trump is extremely unpopular, have criticized the touchy-feely relationship between the two leaders. Several commentaries noted a photograph of Trump leading Macron by the hand down the West Wing colonade to the Oval Office.

On Wednesday afternoon, Macron visited the Martin Luther King Jr. Memorial with civil rights leader John Lewis, a Democratic member of the U.S. House from Georgia, and held a town hall meeting with students at George Washington University. Mirroring similar gatherings that President Barack Obama held on his foreign travels, Macron removed his suit jacket, rolled up his sleeves and answered questions while walking around on a stage.

At the morning address to Congress, Macron’s cross-party appeal was palpable from the moment he walked into the chamber. Members of both parties beamed, hooted and leaped to their feet more than two dozen times as he praised the U.S.-French partnership and endorsed the Trump administration’s efforts to launch denuclearization talks with North Korea.

Democrats were mostly alone, however, in cheering his efforts to balance economic and environmental concerns. They were also generally swifter to applaud Macron’s observations on trade, such as when Macron quipped that “commercial war is not the proper answer” to resolve economic tensions. His general observation that Western countries should “not create new walls” also struck a chord with Democrats, but not with Republicans.

Macron followed a long line of world leaders to address a joint meeting of Congress, from British Prime Minister Winston Churchill in 1941 to Indian Prime Minister Narendra Modi in 2016.

The French leader noted that his speech to lawmakers fell on the 58th anniversary of his predecessor Charles de Gaulle’s address to lawmakers during a visit to Washington in 1960. Although Trump tweeted Wednesday morning that such a “great honor” accorded Macron was “seldom allowed,” well more than 100 leaders have appeared before such joint meetings since Churchill.

Karoun Demirjian contributed to this report.