Washington: France's President Emmanuel Macron on Wednesday urged the United States to embrace multilateralism and warned of the perils of trade war, in an address to Congress pushing back against Donald Trump's "America First" agenda.

The French leader's speech to lawmakers was a dramatic twist at the end of a three-day visit that had showcased his warm personal relationship with Trump, despite the gulf between their visions of world affairs.

The two presidents had literally embraced each other, repeatedly talking up their much-vaunted friendship during the trip, but in his speech to Congress Macron pushed back against Trump's trade, climate and non-proliferation policies.

"We can build the 21st-century world order based on a new breed of multilateralism, based on a more effective, accountable, and result oriented multilateralism," Macron said, defending the rules-based world order.

Trump has threatened to tear up international trade deals, scorns the United Nations, accuses US allies of not pulling their weight, walked away from Paris climate accord and hates dealing with transnational bodies like the European Union.

But Macron, who one day earlier had appeared hand-in-hand with Trump at the White House, received applause from the US leader's domestic Democratic opponents by calling for a "strong multilateralism."

He declared that France would not pull out of the Iran nuclear deal, warned against imposing trade tariffs on allies and stressed that global action on climate change is vital because there is no 'Planet B'.

"The United States is the one who invented this multilateralism. You're the ones now who have to help to preserve and reinvent it," he said, in a tacit nod to Trump's efforts to shake off international shackles.

In doing so, he flipped the script of the trip -- the Trump White House's first full state visit -- which was until now dominated by intimate images of the French and US first couples planting trees, kissing each other and socializing.

Trump at one point brushed Macron's shoulder and said: "He is perfect." Transatlantic political reality reasserted itself on Wednesday, however, as Macron -- speaking in an accented but increasingly confident English -- recalled the glories of past US-French cooperation.

Trump's trade sanctions against European steel and aluminium will enter into force in the coming weeks unless Trump agrees to sign a waiver. Despite his affection for Macron, he has not yet said he will do so. Macron hit back.

"We need a free and fair trade, for sure," Macron said. "A commercial war opposing allies is not consistent with our mission, with our history, with our current commitments for global security." Trump has also warned he may not renew sanctions waivers on Iran next month, which would effectively torpedo the 2015 nuclear deal, a triumph of multilateral diplomacy.

Macron has more sympathy than perhaps any other foreign leader for Trump's arguments that the deal falls short of sealing off Iran's alleged quest for a nuclear weapon -- which the French leader vowed before lawmakers Tehran would "never" be allowed to possess.

Together with Trump, Macron called yesterday for a "new" deal with Tehran, but he made it clear to lawmakers that France would not be walking away from the existing accord.

"It is true to say that this agreement may not help all concerns, and very important concerns," he told the lawmakers. "But we should not abandon it without having something substantial and more substantial instead." "That's my position. That's why France will not leave the JCPOA, because he signed it," he said.