The catalyst for a blossoming friendship between President Trump and his French counterpart Emmanuel Macron could well be a mutual desire to rein in Iran.

But first, wait — friendship? Wasn’t Macron Trump’s sharpest critic, jabbing him on climate change, taunting him on Twitter, even trying to show dominance by refusing to let go during the two leaders’ first handshake and then bragging about it afterward? Won’t he and German Chancellor Angela Merkel diss Trump again this weekend, at the G20 gathering in Hamburg? What about Trump quitting the Paris climate accord, which Macron seemed to take doubly personally?

Yet there are signs of an early thaw: Macron just eagerly joined Trump by vowing French jets will bomb Syria alongside American ones if Bashar al-Assad’s forces use chemical weapons again.

Plus, Macron invited Trump to attend the Bastille Day festivities on France’s national holiday July 14. And Trump accepted.

So Captain Renault and Rick Blaine are about to strike a friendship again as America and France step arm in arm into that Casablanca fog.

Not everyone is cheering, though. Syria is Iran’s client, and Trump is building a regional coalition against Tehran while Congress tries to push through new sanctions. Iranian Foreign Minister Javad Zarif was in Paris over the weekend to try to preempt Macron from joining the pile-on.

Europeans and former Obama officials fear the toughening of Iran policies as well. Last week, former State Department official Jeff Feltman, now heading the United Nations’ political department, gave the Security Council a glowing review of Iran’s compliance with the nuclear deal. That was echoed by top European Union diplomats.

America’s UN Ambassador Nikki Haley spoiled the party by listing Iranian violations of Security Council resolutions, from missile launches and manufacturing to arms sales and the spreading war and terrorism across the Mideast. “We won’t turn a blind eye to the Iranian regime’s behavior and will work with the global community to enforce sanctions,” Haley said.

So which way will France swing? “On this, we’re somewhere in the middle between the EU and America,” a French diplomat told me over coffee here.

It’s a fair assessment. While Zarif tried his charm on Macron, the People’s Mujahedin of Iran (MeK), an anti-regime group, held its annual rally in a Parisian suburb. The group’s leader Maryam Rajavi’s top applause line was a promise that regime change in Iran is “within reach.”

Well, maybe. But here’s the point: France hosted Rajavi and her disciples, conferring sort of legitimacy on the anti-mullah group for decades — even as the State Department listed the MeK as a terrorist group. Former French Foreign Minister Bernard Kouchner addressed the group Saturday. As did some of Trump’s closest allies — Newt Gingrich, Rudy Giuliani, John Bolton — who came as close as possible to saying Trump, too, supports regime change, without quite declaring it in so many words.

You don’t have to support the MeK, or regime change for that matter, to notice the tug of war going on here: Once European leaders are done trying to change Trump’s mind on climate and immigration, they’ll try to influence his Iran policy, begging him not to be too harsh with the mullahs.

It isn’t all so cut-and-dried, though. When questioned about French companies’ push to do more business in Iran, officials point out that in some cases they’re being beaten to deals by major American firms — Boeing, for one, is strong-arming their Airbus out of the Iranian market. Eager to create job opportunities at home, they say, Trump may be willing to do just what some Americans accuse Europeans of doing.

Trump and Macron ought to hash that out this weekend at the G20 and in Paris on July 14. The end of the Obama era has left both countries wondering what their roles are. After all, France took a tougher line on Iran during the runup to the nuclear deal than Team Obama did. Macron — and Trump, for that matter — should follow the example set by Macron’s predecessor.

Perhaps a renewed effort to punish and isolate Iran to better address the nuclear threat will even, eventually, spell the end of a regime that for decades has oppressed Iranians and wreaked havoc on the Mideast and beyond.

If so, this could be the beginning of a beautiful friendship. And more peaceful handshakes.