With exaggerated handshakes and a pair of kisses, President Donald Trump and French President Emmanuel Macron professed a sunny, best-friends relationship Tuesday, even as the two allies strained to bridge differences over the Iran nuclear agreement, Syria and more.

Hosting Macron for the first state visit of his administration, culminating in a lavish dinner Tuesday night, Trump remained firm in his criticism of past and enduring American undertakings in Iran and elsewhere in the Middle East. But he appeared open to the French president's pleas to maintain U.S. involvement in Syria — and expressed openness to negotiating a new agreement with Iran.

As Trump weighs withdrawing the U.S. from the Iran nuclear accord, he issued a warning to Iran against restarting its nuclear program, saying, "They will have bigger problems than they've ever had before."

At a joint White House news conference, he appeared to be more in line with Macron's push for a longer-term U.S. presence in Syria. Trump, who announced weeks ago that he would withdraw American troops, said Macron reinforced the idea of a potential Iranian takeover of territory liberated from the Islamic State group.

"We'll be coming home," Trump said, "but we want to leave a strong and lasting footprint."

Macron told Trump that together the U.S. and France would defeat terrorism, curtail weapons of mass destruction in North Korea and Iran, and act together on behalf of the planet. That last point was a reference to Macron's work to revive the U.S. role in the Paris climate accord to fight global warming, another international agreement Trump has spurned.

Differences aside, Trump and Macron lavished praise — and even a pair of kisses — on each other Tuesday.

"It's an honor to call you my friend," Trump said, after predicting Macron would be a historic leader of France.

In one light moment, Trump sought to demonstrate some of the personal chemistry he claimed. The U.S. president brushed something off Macron's suit jacket, saying, "We have a very special relationship; in fact, I'll get that little piece of dandruff off. We have to make him perfect — he is perfect."

The meetings followed a pomp-filled welcome ceremony on the South Lawn. Highlights included a 21-gun salute and Melania Trump's wide-brim white hat, which drew more comments than all the rest of the pageantry.

Trump said before an audience of U.S. soldiers and members of his Cabinet that the relationship he forged with Macron at the start of his presidency was a testament to the "enduring friendship that binds our two nations." He thanked the French leader for his "steadfast partnership" in the recent missile strike in response to the chemical attack in Syria.

Macron said, "History is calling us. It is urging our people to find the fortitude that has guided us in the most difficult of times. France and with it, Europe, and the United States have an appointment with history." Later he placed a wreath at the Tomb of the Unknowns in Arlington National Cemetery.

The social highlight of Macron's visit was Tuesday night's formal state dinner at the White House. More than 130 guests dined on rack of lamb and nectarine tart and enjoyed an after-dinner performance by the Washington National Opera. The previous evening, the leaders and their wives took a helicopter tour of Washington landmarks and had dinner at the Potomac River home of George Washington in Mount Vernon, Virginia.

As he gave a toast at the dinner, Trump hailed the bonds between the U.S. and France, saying, "May our friendship grow even deeper, may our kinship grow even stronger and may our sacred liberty never die."

As for substantive issues, one of Macron's main objectives during his three-day visit to Washington was to persuade Trump to stay in the Iran accord, which is aimed at restricting Iran's development of nuclear weapons. Trump is skeptical of the pact's effectiveness — "it's insane, it's ridiculous," he said Tuesday — but he declined to say whether he would withdraw the U.S. by the May 12 deadline he has set.

He reminded his French counterpart of what he sees as flaws in the agreement, which he said fails to address ballistic missiles or Iran's activities in Yemen or Syria.

Meanwhile, Iranian Foreign Minister Mohammad Javad Zarif warned that pulling out would undermine America's upcoming nuclear talks with North Korea by proving the U.S. reneges on its promises.

He told The Associated Press in an interview in New York that if Trump withdraws, Iran would "most likely" abandon the deal as well and would no longer be bound by its international obligations. That would free Iran to resume enrichment activity beyond the limits imposed by the 2015 accord.

Macron told reporters that he and Trump would look at the Iran deal "in a wider regional context," taking into account the situation in Syria. "We have a common objective, we want to make sure there's no escalation and no nuclear proliferation in the region. We now need to find the right path forward," Macron said.

Trump suggested he was open to "doing something" beyond the current Iran agreement as long as it was done "strongly."

On North Korea, Trump told Macron that North Korean leader Kim Jong Un wanted to meet "as soon as possible." The president, who once derided Kim as "Little Rocket Man," said he has been "very open" and "very honorable" so far.

Macron, who calls Trump often, has emerged as something of a "Trump whisperer" at a time when the American president's relationships with other European leaders are more strained. Trump, who attaches great importance to the optics of pageantry and ceremony, chose to honor Macron with the first state visit of his administration as he woos the French president.

Trump ended his first year in office without receiving a foreign leader on a state visit, the first president in nearly 100 years to fail to do so. He was Macron's guest last July at the annual Bastille Day military parade in Paris. Macron and his wife, Brigitte, also took Trump and his wife on a tour of Napoleon's tomb and whisked them up in the Eiffel Tower for dinner overlooking the City of Light.

___

Associated Press writers Ken Thomas and Jonathan Lemire contributed to this report.

___

Follow Darlene Superville on Twitter: http://www.twitter.com/dsupervilleap