The ICJ says Washington must allow exports of humanitarian goods to Iran, siding with Tehran in a case brought to The Hague.
The United States has been ordered to lift some sanctions against Iran, in a symbolic victory for Tehran.
The United Nations’ top court, the International Court of Justice (ICJ), says anything that has an impact on humanitarian aid and civil aviation safety must be suspended.
President Donald Trump has moved to restore tough US sanctions after withdrawing from Tehran’s nuclear accord with world powers.
Iran brought its case to The Hague based on the Treaty of Amity, a UN document dating from 1955, well before the 1979 Islamic revolution.
What did the court say?
In their ruling, the 15-strong panel of judges unanimously dismissed US objections that the court had no jurisdiction. Washington had argued that Iran’s action was a misuse of the court.
The ruling also rejected US assurances, given in August, that sanctions would not affect humanitarian conditions. This was “not adequate to address fully the humanitarian and safety concerns raised” by Iran, the court said.
It said US sanctions must not hurt medicines and medical devices; foodstuffs and agricultural commodities; or parts, equipment and services necessary for civil aviation safety.
The first batch of American sanctions reimposed on Iran in August included food and commercial aviation.
Iran has welcomed the ruling. "The decision proved once again that the Islamic Republic is right and the US sanctions against people and citizens of our country are illegal and cruel, "the foreign ministry said in a statement on Tasnim news agency and state media.
What impact will the ruling have?
The court action brought by Iran was part of a drive on several fronts to isolate Washington, following the US withdrawal from the 2015 accord which lifted sanctions in return for constraints on Iran’s nuclear programme.
However, although ICJ rulings are binding, the court has no power to enforce them.
The Trump administration has been dismissive of the international court and the president did not back down from his threat to rip up the nuclear agreement.
The US president says he hated the deal as it did not address Iran’s alleged wider meddling in the Middle East.
The next batch of US sanctions on Iran, due to come into force in November, target Iran’s lucrative oil industry and energy sector. Iran’s economy has been under enormous pressure with many people suffering hardship, and recent months have brought a wave of anti-government protests.
Iran and the EU have been working actively to keep the nuclear accord alive, and protect international companies doing business with the country from US sanctions.
Iran's President Hassan Rouhani praised Europe on Wednesday for taking a "big step" to maintain business with Tehran after the United States' unilateral withdrawal from the deal. He was quoted by Tasnim news agency as saying that Trump was acting for "domestic political gains".
However, Iran’s Foreign Minister Javad Zarif has said the door remains open to talks with the US, as long as the meeting is “reliable” and the talks meaningful.
What remains unclear is the extent to which the goal of the Trump administration is to force Iran back to the negotiating table – or to go further and push for regime change in Tehran.