President Trump on Monday said he might be willing to meet with Iranian President Hassan Rouhani down the road should the Muslim theocracy change its behavior.

“If the circumstances were correct or right, I would certainly agree to that,” Trump said on the third and final day at the G-7 summit in France. “In the meantime, they have to be good players.”

French President Emmanuel Macron told reporters at a joint news conference with Trump that he hoped that the commander-in-chief and Rouhani would start talking within weeks to come up with a replacement for the Joint Comprehensive Plan of Action, which limited Iran’s ability to produce nuclear weapons.

Trump pulled the US out of the agreement in May 2018, and continued excoriating the deal even as the other signatories have remained on board.

“I’ll tell you what, we made a ridiculous deal, we gave them $150 billion, we gave them $1.8 billion and we got nothing,” Trump said, referring to Iranian assets that had been frozen after the country’s revolution in February 1979 and ensuing hostage crisis and were returned as part of the nuke deal.

The president also said that the deal — which imposed restrictions for a decade — was not long enough to be a meaningful deterrent.

“With a country, you don’t make a deal that short. Countries last for a long time. And you don’t do short-term deals, especially when you’re paying that kind of money,” he said.

“We’re looking for no nuclear weapons, no ballistic missiles and a longer period of time.”

Still, he said he was optimistic that an agreement eventually could be worked out.

“So I have good feelings about Iran. I have good feelings that it will work. I know many Iranians living in New York City have many friends from Iran. They’re incredible people. Incredible people.”

And he repeated his contention that since he took office, Iran’s power and regional influence have waned.

“Iran is a country that is not the same country that it was two and a half years ago when I came into office. Iran was the number one state of terror throughout the world,” Trump asserted.

“There were 18 sites of confliction in my first week when I spoke with the folks at the Pentagon, including lots of generals and lots of other military experts. Eighteen sites of confliction, meaning 18 sites of big problems. Every one of them was backed by Iran or in some cases actually using Iranian soldiers.”