WASHINGTON ― U.S. President Donald Trump said Monday at the G-7 summit he would be willing to meet with Iran’s leader under the right circumstances, a sign simmering tensions between the two nations could soon reach a diplomatic solution.

“If the circumstances were correct or right, I would certainly agree to that,” Trump said of a meeting with Iranian President Hassan Rouhani, which was proposed by French President Emmanuel Macron. “But in the meantime, they have to be good players."

Trump said he was not looking for regime change in Iran. "I really believe that Iran can be a great nation, but they can't have nuclear weapons." The pursuit of those weapons, he said, would be met with "really, very violent force.”

Speaking alongside Trump at the summit in in Biarritz, France, Macron said G-7 leaders had agreed that Iran needs to meet its nuclear obligations and that there was a hope for a diplomatic breakthrough in the tensions that have grown since the U.S. left the 2015 nuclear accord. Rouhani, Macron said, had already agreed to hold a meeting, a possibility he said that could be weeks away.

Since the U.S. withdrawal from the Iran nuclear deal last year, there has been an increasing tempo of attacks and alleged threats, notably this weekend, from unmanned aircraft flown by Tehran’s and Washington’s allies in the region. The U.S. military nearly launched airstrikes against Iran after a U.S. military surveillance drone was shot down in June.

This May, the nuclear-capable B-52 bombers, fighter jets, an aircraft carrier and additional troops to the region over what it described as threats from Iran. Mysterious explosions struck oil tankers near the Strait of Hormuz.

At the summit, Macron risked Trump’s wrath with its high-stakes invitation to Iranian Foreign Minister Mohammad Javad Zarif to appear on the sidelines. Though Trump had declined to meet with Zarif, Macron’s gambit appeared to pay off after Trump discussed the matter with Macron in private and expressed hope Monday the U.S.-Iran impasse could be cleared.

“I have a very good feeling about it. I think we’re going to do something about it,” Trump said.

Asked whether a meeting could happen within weeks, Trump suggested Iran was the motivated party, as U.S. sanctions had crippled its economy. He expressed openness to multilateral economic aid to Iran in the form of credit, secured by Iranian oil, but suggested U.S. would not be offering aid to Iran: “We don’t pay.”

“They’re really hurting badly,” Trump said of Iran. “Their inflation is through the roof. Their economy has tanked entirely. The sanctions are absolutely hurting them horribly. I don’t want to see that. They’re great people.”

Trump is seeking a longer agreement that bars Iran from nuclear weapons and ballistic missiles and includes surveillance of more possible weapons sites. He repeated criticism of the deal painstakingly struck under the Obama administration.

The appearance of Zarif, which the Trump administration has sanctioned, made international headlines. Amid speculation Macron had outmaneuvered Trump as he attempted to salvage the deal, Macron took pains to say Monday he had informed Trump of the invitation to Zarif ahead of time.

France and the other G-7 leaders had opposed Trump’s decision to pull the U.S. out of the deal with Iran and impose new sanctions as part of a “maximum pressure” campaign to hurt its economy by cutting off its oil sales.

At home, Trump has been under pressure to take a hard line against Tehran both from inside his administration and from Capitol Hill, where Republican lawmakers criticized Macron’s invitation to Zarif.

“Iran is the #1 state sponsor of terrorism,” Texas Sen. John Cornyn, part of the Senate GOP’s leadership team said Sunday in a tweet. “Why would Macron suck up to stone cold killers?”

The Associated Press contributed to this report.