The UN's top court has said it can hear Iran's bid to overturn US nuclear sanctions reimposed by Donald Trump, prompting "disappointment" in Washington, which had argued the issue lies outside its jurisdiction.

Iran's foreign minister swiftly hailed Wednesday's decision as a "victory" in the case launched three years ago at the International Court of Justice (ICJ) in The Hague.

Tehran alleges that Trump, when he was US president, breached a 1955 friendship treaty between the two countries by pulling out of a 2015 nuclear deal -- to the dismay of European allies -- and reactivating the sanctions.

Washington had said the Hague-based ICJ did not have jurisdiction and must throw out the case. It also argued the sanctions were necessary because Iran posed a "grave threat" to international security.

But judges at the court rejected all the US objections.

ICJ President Abdulqawi Ahmed Yusuf said the tribunal "finds consequently that it has jurisdiction.... to entertain the application filed by the Islamic Republic of Iran".

The US State Department said it was "disappointed" by the decision.

"In the next phase of this case we'll explain why Iran's claim has no merits," spokesman Ned Price said.

A final ruling on sanctions by the ICJ -- set up after World War II to rule in disputes between UN member states -- 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 United States.

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".

It is the second win for Iran in the case, after the ICJ ordered the US in 2018 to ease sanctions on humanitarian goods as an emergency measure while the overall lawsuit is dealt with.

In response, Washington formally ended the Treaty of Amity that same year.

"Another legal victory for Iran," foreign minister Mohammad Javad Zarif tweeted on Wednesday.

"Iran has always fully respected int'l law. High time for the US to live up to its int'l obligations," Zarif said.

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

Iranian President Hassan Rouhani earlier Wednesday ruled out changes to the nuclear accord and dismissed calls to broaden the terms of the deal and include regional countries.

New US President Joe Biden has voiced support for returning to the deal but insisted that Tehran must 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.

Zarif on Monday asked the European Union to help coordinate a return to the nuclear deal.