CNN  — 

From the moment French President Emmanuel Macron tore up the G7 road map by canceling the joint communique, he transformed the gathering of the world’s seven largest advanced democracies.

His tactic opened the door to a weekend of head-snapping spin and surprise, not least that President Trump stayed, smiling and handshaking with the host until the very end.

It was a sharp contrast to Trump’s storming out early at the last G7 and testimony to Macron’s fleet-footed diplomacy.

The rationale Macron gave behind his eve-of-summit cancellation – “it’s pointless” – was a reference to Trump’s refusal to sign last year’s communique in Canada.

French President Emmanuel Macron, right, and US President Donald Trump shake hands during the final press conference during the G7 summit Monday.

To some at the White House, Macron’s motives appeared more ruthless. They complained the G7 agenda favored Macron, not Trump, leaving the US President little time to tout his own self-perceived economic prowess.

Without the communique, which is often a largely pre-agreed end point to the summit’s race through global crisis, only he, Macron, would know the route, allowing him to plan a few surprises along the way, which he did, seemingly to perfection.

On Sunday, enter Iran’s Foreign Minister, Javad Zarif, at Macron’s invite, an arrival almost without precedent at such events. And so the chaos began.

Shortly before Zarif’s arrival Trump denied he’d backed Macron to negotiate with Iran on behalf of the G7, with Trump’s aides saying Zarif’s visit was a “curveball.”

By early Monday, Trump was reversing course and playing along with Macron’s secretive diplomacy. He said he not only knew Zarif was coming, he authorized Macron to invite him.

“He spoke to me,” Trump said. “He asked me. I said if you want to do that, that’s OK. I don’t consider that disrespectful at all, especially when he asked me for approval”.

Yet side by side with Trump at a joint press conference, Macron deftly disputed Trump’s account of events, saying he did it for France, not the G7.

“I did it on my own, I informed – before making it [inviting Zarif], President Trump was informed about the situation,” Macron said.

If Trump blanched it wasn’t noticeable. Macron got what he’s wanted for months, inching the US President closer to a climb-down on tensions with Iran, announcing that “at one moment or another there must be a meeting between the President of Iran and the President of the United States.” Macron even suggested it could come in a matter of weeks.

Trump gave conditional assent, saying, “If the circumstances were correct or right I would certainly agree to that,” and adding, “In the meantime they have to be good players.”

Trump spent the weekend re-inventing his international image, laying on spin and half-truths in equal measure. Not the sour odd man out he was at the Quebec G7, but a genial team player, Trump said there had been “no arguments,” that “we are all getting along great” and there has been “a lot of unity.”

It was not clear if any of the leaders were really buying his bonhomie, although German Chancellor Angela Merkel did manage a smile or two with Trump, much better than their past frosty encounters, not least at last year’s G7.

On Iran, she seemed to tamp down Macron’s expectations that Trump and Iranian President Hassan Rouhani could be meeting soon.

“We had very productive talks on this issue but it is still moving, and is slowly moving forward but there is a long way to go,” she said.

Yet by Trump’s account plans for a de-escalation are advanced to the point of how he is willing to get Iran to the table.

“They may need a short-term letter of credit or loan. No, we’re not paying. We don’t pay. But they may need some money to get them over a very rough patch,” he said.

Macron’s apparent G7 success did not come overnight. A month ago Trump was putting down the French leader’s talks with Iran, saying, “I know Emmanuel means well, as do all others, but nobody speaks for the United States but the United States itself.”

Novice British Prime Minister Boris Johnson eluded to Macron’s fancy diplomatic footwork. Congratulating him on dinner Saturday where Macron first warned leaders Zarif might be coming, Johnson said, “Well done. Bien joué. You’re doing well. You did very well last night, my God. That was a difficult one. You did brilliantly.”

It was not quite clear to what Johnson was referencing, but even if Macron’s Iran initiative doesn’t survive Trump’s transatlantic flight home, he seems to have set a new bar handling the prickliest US President in living history.