The UN's top court will rule Wednesday whether it can take on Iran's bid to overturn US nuclear sanctions, reimposed by the administration of former US president Donald Trump.

Tehran dragged the United States to the International Court of Justice in mid-2018, saying Washington breached a 1955 friendship treaty between the two countries.

Then-president Trump reimposed the sanctions after pulling out of a 2015 nuclear deal with Iran to the dismay of European allies.

The United States says the Hague-based ICJ does not have jurisdiction and must throw out the case.

It also argues the sanctions were necessary because Iran posed a "grave threat" to international security.

The ICJ was set up by the United Nations after World War II to rule in disputes between member states.

If the court allows the case to go ahead, a final ruling could still be months or even years away.

The 2015 nuclear deal saw Tehran limit its nuclear powers and let in international inspectors, in return for an end to years of sanctions by the West.

After Trump pulled out, Iran invoked the 1955 "Treaty of Amity", which predates the 1979 Islamic revolution that overthrew the pro-US shah and severed ties with the US.

A man walks past a mural painted on the outer walls of the former US embassy in Tehran
A man walks past a mural painted on the outer walls of the former US embassy in Tehran AFP / ATTA KENARE

Iran said the reimposition of sanctions caused "hardship and suffering" and was "ruining millions of lives."

Washington formally ended the Treaty of Amity in late 2018 after the ICJ ordered it to ease sanctions on humanitarian goods as an emergency measure, while the overall lawsuit is dealt with.

The 2015 nuclear deal involving the five permanent members of the UN Security Council -- Britain, China, France, Russia and the United States, plus Germany -- has hung by a thread since Trump pulled out.

But Iran's Foreign Minister Mohammad Javad Zarif on Monday asked the European Union to coordinate a synchronised return of both Washington and Tehran.

Zarif told CNN that EU foreign policy chief Josep Borrell should play a role in his position of coordinator of the 2015 agreement, adding the "United States needs to come back into compliance and Iran will be ready immediately to respond."

US President Joe Biden has voiced support for returning to the accord but has insisted that Tehran first resume full compliance by reversing measures it took to protest the sweeping sanctions imposed by his predecessor.

The Biden administration argues that Trump's actions badly backfired, with Iran both moving away from the nuclear deal and only intensifying its opposition to US interests.

Secretary of State Antony Blinken has warned that Iran could now produce enough fissile material for a nuclear weapon within "a few months."