WASHINGTON — 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 session of Congress, amid frequent standing ovations and cheers, Macron recalled the long history of U.S.-French relations and shared values and culture on everything from democracy and freedom to human and civil rights, literature, jazz and the “#MeToo” 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 the U.S. president with whom he has said he has a special relationship.

Macron expressed his hope that the United States would re-enter the Paris climate accord, which President Donald 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?”

He said he believed U.S. and French disagreement on the climate issue was “short term” and that “in the long run, we will have to face the same realities. We’re just citizens of the same planet.”

Macron also called for resolution 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. We should follow them.”

On Iran, he repeated his support for the nuclear trade deal and outlined a four-part solution to Trump’s concerns about the deal and Iranian expansionism in the Middle East.

“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, adding that respect for sovereignty must include Iran, “which represents a great civilization.”

“Let us not replicate past mistakes,” he said. “Let us not be naive on one side ... let us not create new wars on the other side.”

Trump, who has called the agreement “the worst deal” in history and has said he will determine by May 12 whether to withdraw 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 leave the agreement in place, while strengthening it by working on a larger, four-part international agreement that would also contain Iran’s ballistic missile program and its military expansion in the region.”

Macron’s cross-party appeal was palpable from the moment he walked into the chamber — lawmakers did not appear to mind that he was running about 20 minutes late. Members of both parties beamed, hooted and leaped to their feet more than two dozen times as Macron praised the U.S.-French partnership and endorsed the Trump administration’s efforts to launch denuclearization talks with North Korea.

But Macron began to lose the Republicans in the chamber when he spoke at length about the environment, criticizing those who prioritize short-term economic gains over the long-term health of the planet. Democrats were alone in cheering his efforts to balance economic and environmental concerns, while only a few moderate Republicans, such as Reps. Carlos Curbelo, R-Fla., and Elise Stefanik, R-N.Y., applauded his hope that the United States would rejoin the Paris agreement.

Democrats were generally swifter to applaud Macron’s observations on trade than Republicans, for whom certain gestures of approval mean crossing Trump — 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 Republicans.

Nonetheless, top members of both parties heartily applauded Macron after his 50-minute speech, and several rank-and-file members gathered in the well of the House chamber to introduce themselves and offer their congratulations.

One member of the top congressional brass was noticeably missing: Senate Minority Leader Chuck Schumer, D-N.Y. A spokesman for Schumer said the leader had a scheduling conflict.

Interior Secretary Ryan Zinke, Treasury Secretary Steven Mnuchin, Energy Secretary Rick Perry and Education Secretary Betsy DeVos also attended the speech.

Macron followed a long line of heads of state to address a joint session. The French leader noted that his speech to lawmakers fell on the 58th anniversary of the last time a French leader spoke to lawmakers, when President Charles de Gaulle visited Washington in 1960. Although Trump tweeted Wednesday that such a “great honor” was “seldom allowed,” more than 100 leaders have appeared before a joint session since Winston Churchill in 1941.