US President Donald Trump has said he is open to meeting Iran's President Hassan Rouhani under the right circumstances.
It comes after Iran's foreign minister made a brief and unannounced visit to the G7 summit in France on Sunday.
Relations between Iran and the US have deteriorated since Washington withdrew last year from a 2015 deal to limit Iran's nuclear activities.
However, on Monday, Trump said he had "good feelings" about the prospect of a new nuclear deal with Iran, the BBC reported.
"Iran is not the same country it was two and a half years ago when I came into office, " he told reporters at a joint G7 press conference with French leader Emmanuel Macron.
"I really believe that Iran can be a great nation. . .
but they can't have nuclear weapons, " he said, adding that they had to be "good players" before he would agree to a meeting.
Earlier on Monday, Rouhani said he was ready to meet anyone if he felt it would benefit Iran.
"If I am sure that attending a session or having a meeting with someone will help develop my country and resolve the people's problems, I will not hesitate to do so, " he said.
Tensions with Iran have been heightened since the US unilaterally withdrew from the 2015 nuclear deal, and re - imposed sanctions.
Other parties to the agreement - the UK, France, Germany, Russia and China - have sought to salvage the nuclear deal.
On Sunday, Iranian Foreign Minister Mohammad Javad Zarif said he had had "constructive" talks with his French counterpart, and Macron, on the sidelines of the G7 talks in Biarritz.
Macron, who has taken an active role to try and save the accord, said he had informed Trump of his plan to invite Zarif, after discussions with Iranian officials on possible solutions.
He said he believed the "conditions for a meeting" between Trump and Rouhani "in the next few weeks" had been established.
"Nothing is set yet and things are still fragile, but technical discussions have started with some real progress, " he said, adding that he had told Rouhani that "if he accepts a meeting with President Trump, I am convinced an agreement can be found".