The U.N.'s top court has ruled in Iran's favor in its dispute with the U.S., giving the country a partial victory by saying the U.S. "must remove" sanctions that could stop food, medical supplies and other humanitarian products from entering Iran.

The unanimous ruling from the International Court of Justice orders the U.S. not to restrict money flowing between Iran and its trading partners for a list of products it says should be cleared for export to Iran, from medical devices and agricultural commodities to parts and equipment needed to safely maintain Iran's civil aviation.

Limiting food and medical products "may have a serious detrimental impact on the health and lives of individuals on the territory of Iran," the court said.

Iran filed the case in July, after President Trump withdrew the U.S. from the Joint Comprehensive Plan of Action – the Iran nuclear deal that was reached in 2015 along with members of the U.N. Security Council, Germany and the European Union. The court's ruling also referred to the 1955 treaty of amity that laid out economic relations between the two countries.

The court's ruling leaves intact U.S. sanctions that cover a range of Iranian economic activity, from exports of carpets and food to financial transactions and trade in metals.

In Iran, the threat of renewed sanctions have been taking a toll since at least the spring.

"Since, let's say, March, there has been unprecedented acceleration in the prices of everything - almost everything," a Tehran resident told NPR's Peter Kenyon . The prices of a few items, like fuel and bread, were tightly regulated, he added.

The ruling comes one month before the Trump administration is due to impose another round of sanctions on Iran, on Nov. 4. That's when the country's oil industry will likely be targeted.

When the first round went into effect in August, President Trump said in a tweet , "These are the most biting sanctions ever imposed, and in November they ratchet up to yet another level." Any country doing business with Iran, he said, would not be allowed to trade with the United States.

Trump says the nuclear deal was too accommodating to Iran, calling it a one-sided agreement that opened new financial doors to a dictatorship.

Copyright 2018 NPR. To see more, visit http://www.npr.org/ .