TEHRAN - Iran has lodged a complaint with the International Court of Justice against the United States' reimposition of sanctions, the foreign ministry said on Tuesday.

The complaint was registered the previous day, spokesman Bahram Ghasemi said on the ministry's website. The goal is "to hold (the) US accountable for its unlawful re-imposition of unilateral sanctions," Foreign Minister Mohammad Javad Zarif wrote on Twitter.

"Iran is committed to the rule of law in the face of US contempt for diplomacy and legal obligations. It's imperative to counter its habit of violating (international) law," he added. The complaint came in response to Washington's decision in May to abandon the 2015 nuclear deal and reimpose sanctions on Iran.

Tehran says the action violates international obligations, including the 1955 US-Iran Treaty of Amity - an agreement signed well before Iran's 1979 revolution, but which is still invoked in ongoing legal battles.

Iran and the US have not had diplomatic relations since 1980, when American embassy officials were held hostage in Tehran. Nuclear-related sanctions will be reimposed by Washington in two phases in August and November, seeking to bar European and other foreign companies from doing business with Iran and blocking its oil sales abroad.

Iran and the other signatories to the 2015 agreement have been scrambling to preserve the limited trade deals they were able to secure since it was signed.

Zarif addressed world diplomats and Iranian businessmen at a lavish Tehran hotel on Monday night, in a meeting designed as a show of continued mutual support in the face of US aggression. "This administration in the United States doesn't know how to behave towards the world... it breaks international treaties as a tool. It is necessary to put a stop to this behaviour," Zarif said.

Austrian ambassador Stefan Scholz, whose country currently holds the presidency of the European Union, said "unorthodox and innovative measures" were being considered to allow banking transactions to continue after US sanctions return.

The ICJ is already due to hear a complaint on October 8 that Iran lodged two years ago against the United States for freezing around $2 billion of its assets held abroad. Iran is ready to boost its uranium enrichment to higher levels if talks fail with Europe on salvaging the nuclear deal, a top official said Tuesday.

“We have of course adopted some measures in order to prepare the ground for eventually increasing the level of enrichment if it is needed and if the negotiations with the Europeans fail,” Behrouz Kamalvandi, spokesman and vice-president of Iran’s Atomic Energy Organisation, told a news conference in Tehran.

Meanwhile, US President Donald Trump asserted Monday that Iran was being roiled by nationwide riots since he pulled out of an international nuclear deal and that Washington supports the protesters.

Trump, interviewed after his summit in Helsinki with President Vladimir Putin, said that Russia still supported the nuclear accord because it does business with the regime in Tehran, so the deal is in Moscow's interest. "It is not good for us or for the world, but they have riots in all their cities," Trump told Fox News."The inflation is rampant, going through the roof. And not that you want to hurt anybody, but that regime wouldn't let the people know that we are behind them 100 percent.

"They are having big protests all over the country, probably as big as they have ever had before. And battles happened since I terminated that deal, so we will see," he added.

Over the objections of allies, Trump in May pulled the United States from the nuclear deal signed between Tehran and world powers in 2015.

He reimposed US sanctions that had been suspended in return for controls on Tehran's nuclear programme, effectively barring many multinational firms from doing business in Iran.

Iran has been defiant in the face of the US move, saying it has left the Trump administration internationally isolated.

"The illegal logic of the United States is not supported by any of the international organisations," President Hassan Rouhani said at the weekend.

Iran has faced mounting economic woes since Trump's withdrawal announcement, with inflation rising sharply.

Its currency has plunged almost 50 percent in value in the past six months against the US dollar, prompting a rare strike earlier this month by traders in Tehran's Grand Bazaar. There have also been reports of brief scuffles and small-scale protests in recent weeks although not of mass demonstrations.