Later, in a news conference before wrapping up his three-day visit to the United States — the first formal state visit of the Trump era — Mr. Macron told reporters that while he could not be certain, he expected that Mr. Trump would disregard his entreaties and withdraw from the nuclear deal after all, given that scrapping it was a campaign promise.
On Capitol Hill, Mr. Macron was greeted warmly with a three-minute standing ovation, and he drew several more ovations throughout his speech as he outlined his vision of global affairs and the alliance between the United States and France, in nearly flawless English.
He opened with a humorous nod to the much-discussed embraces he and Mr. Trump shared at the White House on Tuesday, comparing their interactions to those between the French philosopher Voltaire and Benjamin Franklin when they met in Paris in 1778.
“They embraced each other by hugging one another in their arms, and kissing each other’s cheeks,” Mr. Macron said, pausing for effect. “It can remind you of something.”
He spoke about the “unbreakable bonds” between the United States and France and their common values of tolerance, liberty and human rights.
But in substance, Mr. Macron’s address illustrated the degree to which the warm personal rapport between the two presidents contrasts with the stark divides between them on vital questions of policy.
Mr. Macron attacked nationalism and argued that it was up to the United States to preserve the international order it had helped to create.
“We have to shape our common answers to the global threats that we are facing,” Mr. Macron said, calling for a new, “strong multilateralism.”
“The United States is the one who invented this multilateralism,” he went on. “You are the one now who has to help to preserve and reinvent it.”
Mr. Macron implicitly denounced Mr. Trump’s decision to impose steep tariffs on steel and aluminum, saying that the solution to the challenges of global trade was not “massive deregulation and extreme nationalism.”
“Commercial war is not the proper answer,” Mr. Macron said. “At the end of the day, it will destroy jobs, increase prices, and the middle class will have to pay for it.”
Problems should be solved, he said, by negotiating at the World Trade Organization, an institution that Mr. Trump recently called “a disaster” that enforces global trade rules.
“We wrote these rules,” Mr. Macron said. “We should follow them.”
He also railed against inaction in the face of global climate change, using what has come to be his catchphrase for why the Paris climate accord — from which Mr. Trump has withdrawn — must be preserved.
“Let us face it: There is no Planet B,” Mr. Macron said. “I am sure one day the United States will come back and join the Paris agreement.”
He played down his dispute with Mr. Trump on the climate pact as “a short-term disagreement” that should not prevent the United States and France from working to confront climate change challenges.
Borrowing a phrase from Mr. Trump, he said, “Let us work together in order to make our planet great again.”
On the campus of George Washington University later in the day, Mr. Macron shed his suit jacket and fielded questions from students on a wide range of issues, drawing a vivid contrast with Mr. Trump in the process. Asked about what one student called the “mass migration” to Europe from the Middle East and Africa, and a corresponding increase in terrorist attacks and assaults — a linkage Mr. Trump often makes — Mr. Macron pushed back.
“I don’t believe these phenomena are directly linked to this current migration,” he said, to applause from the audience.
Speaking specifically about Muslims, whom Mr. Trump once proposed barring from the United States, Mr. Macron said: “The best answer is not just to reject these people. Not true. The proper answer is just to ask everybody in your country to respect the law of the country.”