But Iran's government dismissed the idea that it was the result of any negotiations between the two countries, which have not had diplomatic ties since 1980.

The exchange involved Xiyue Wang, a Chinese-born American held in Iran since 2016, and Massoud Soleimani, an Iranian scientist detained in the United States since 2018.

urday in exchange for an Iranian scientist held in the United States.

US President Donald Trump thanked Iran for what he called a "very fair negotiation" after an American scholar was released Sat

Iran said Monday it was open to more prisoner swaps with the US while stressing an exchange at the weekend was not the result of formal negotiations with its arch-foe.

"This was only an exchange and... regarding exchanges we are ready to act but there are no negotiations," spokesman Ali Rabiei said on state television.

"Negotiations or any kind of talks" can only take place "within the framework of the 5+1 and after America has refrained from sanctions and economic terrorism," he said.

The P5+1 is the group of countries that agreed a nuclear deal with Iran in 2015 -- the five veto-wielding permanent members of the UN Security Council plus Germany.

The nuclear deal has been hanging by a thread since last year, when Trump unilaterally withdrew from the accord and began reimposing sweeping sanctions on the Islamic republic.

Iran's government has long demanded that the US first drops the sanctions for it to return to negotiations under the auspices of the P5+1.

Wang, doctoral candidate at Princeton, was conducting research in Iran when he was imprisoned in August 2016. He had been serving 10 years on espionage charges.

Soleimani, a professor and stem cell researcher at Tehran's Tarbiat Modares University, was arrested at a Chicago airport in October 2018 for allegedly attempting to ship growth hormones.

On Monday, the Iranian spokesman Rabiei said the prisoner swap came despite a US rejection of an offer Tehran made to Washington last year for an exchange of all detainees.

A few months ago, he said, Iran had received a message from "a former US official" saying the Americans were ready to make an exchange.

Rabiei appeared to be referring to former US congressman Jim Slattery who, according to the New Yorker magazine, had

approached the Iranians on behalf of the Wang family's lawyer.

In its report, the New Yorker said Soleimani was expected to be deported after pleading guilty under a deal that Slattery had worked on with Soleimani's lawyers.

"In a surprise move, however, the Justice Department instead dropped all charges against Soleimani," before the exchange went ahead, it said, citing an official from the US administration.