Rouhani says Iran favours talks but US must lift sanctions.

President Hassan Rouhani said on Tuesday that Iran favours talks with the US if it lifts sanctions against the Islamic republic, despite his top diplomat turning down a meeting with US President Donald Trump.

Rouhani said that "peace with Iran is the mother of all peace" and "war with Iran is the mother of all wars" as he defended a landmark 2015 nuclear deal between Iran and world powers.

"The Islamic Republic of Iran favours talks and negotiations and, if the US really wants to talk, before anything else it should lift all sanctions," Rouhani said in remarks aired live on state television.

Rouhani, speaking at the foreign ministry after meeting with his top diplomat, Mohammad Javad Zarif, said Iran was ready for talks regardless of whether or not the US was party to a landmark nuclear deal.

"Whether they want to come into the JCPOA or not, it's up to them," said Rouhani, referring to the 2015 nuclear deal known formally as the Joint Comprehensive Plan of Action.

"All sanctions should be lifted so that there will be no criminals facing us," he said, accusing the US of committing acts of "economic terrorism" for blocking imports of food and medicine.

"So if it wants talks, it must prepare the path for it. The path to it is repent. There is no other way."

Tensions between Iran and the US have been rising since Trump unilaterally withdrew the United States from the nuclear deal in May 2018 and began imposing sanctions on it as part of a campaign of "maximum pressure".

Twelve months on, Iran hit back by suspending some of its commitments under the deal.

The situation threatened to spiral out of control with ships attacked, drones downed and oil tankers seized.

At the height of the crisis, US President Donald Trump called off air strikes against Iran at the last minute in June after the Islamic republic's forces shot down a US drone

'Oil for oil'

Rouhani said in any talks the Americans should be ready to negotiate fairly.

"If you want security, if your soldiers want security in the region, (then agree to) security for security," he said. "You cannot harm our security and then expect your own security.

"Peace for peace and oil for oil," he added. "You cannot say that you won't allow our oil to be exported.

"Strait for strait. It cannot be that the Strait of Hormuz to be free for you and the Strait of Gibraltar not to be free for us."

Iran has also been locked in a high-seas standoff with US ally Britain since Royal Marines helped to seize a tanker carrying Iranian oil off the British overseas territory of Gibraltar on July 4.

Weeks later, its Revolutionary Guards impounded a British-flagged tanker in the Strait of Hormuz -- the conduit for much of the world's crude.

Foreign minister Zarif on Monday confirmed reports that he had turned down an offer from a US senator to meet Trump at the White House last month.

Zarif said on Monday that he had turned down the offer despite a threat of being hit with sanctions within two weeks.

"I was told in New York I would be sanctioned in two week unless I accepted that offer, which fortunately I did not," he said.

The New Yorker magazine reported on Friday that Senator Rand Paul met Zarif in the US on July 15 and had Trump's blessing when he extended the invitation to the Iranian foreign minister.

The United States imposed sanctions against Zarif on Wednesday, targeting any assets he has in America and squeezing his ability to function as a globe-trotting diplomat.