The United Nations' highest court has ordered the United States to lift sanctions on Iran that affect imports of humanitarian goods and products and services linked to the safety of civil aviation.
Judges at the International Court of Justice (ICJ) handed a victory to Tehran, which had argued that sanctions imposed since May by the administration of US President Donald Trump violate the terms of a 1955 Treaty of Amity between the two countries.
Iran welcomed the decision, calling the sanctions "illegal and cruel."
"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 published on Tasnim news agency and state media.
The ruling is likely to have at most limited practical impact on the implementation of sanctions, which Washington is reimposing and tightening after pulling out of a 2015 nuclear deal that Iran signed with world powers.
The ICJ is the United Nations highest court for resolving disputes between nations. Its rulings are binding, but it has no power to enforce them, and both the United States and Iran have effectively ignored its decisions in the past in cases they have brought against each other.
The court found that assurances offered by Washington in August that it would do its best to ensure sanctions would not affect humanitarian conditions were "not adequate to address fully the humanitarian and safety concerns raised" by Iran.
"The court considers that the United States must, in line with its obligations under the 1955 treaty, remove by means of its choosing any impediment arising from the measures announced on 8 May 2018," said Presiding Judge Abdulqawi Yusuf, reading a summary of a ruling by the 15-member panel of justices.
The sanctions may not hurt "exportation to the territory of Iran of goods required for humanitarian needs such as medicines, medical devices and foodstuffs and agricultural commodities as well as goods and services required for the safety of civil aviation," he said.
Washington argued last month that Iran's request was an attempt to misuse the court and that the 1955 treaty specifically ruled out using courts to resolve disputes.
The treaty was signed long before Iran's 1979 Islamic Revolution which turned the two countries into arch foes.
US State Department Legal Adviser Jennifer Newstead had said Iran's real quarrel was Iran's frustration over US plans to pull out of the 2015 nuclear pact, under which Iran agreed to curbs on its nuclear program in exchange for the lifting of international sanctions.
The unilateral US move has been opposed by the other countries that are party to the agreement, including Washington's close European allies Britain, France and Germany as well as Russia and China.
Despite international criticism, Washington is pushing ahead with the measures. A new series of sanctions is due to go into effect Nov. 4 aimed at sharply curtailing Iranian oil exports.