The United Nations’ top court has ordered the United States to lift sanctions on Iran that affect imports of humanitarian goods and products, AFP reported on Wednesday.

In May, Trump pulled the US out of a nuclear agreement that the administration of former President Barack Obama had signed with Iran, calling it “decaying and rotten”. In August, the US president reimposed sanctions on the Islamic republic.

In July, Iran challenged the sanctions in a case filed at the International Court of Justice. The court, in a preliminary ruling, said Washington must “remove, by means of its choosing, any impediments arising from” sanctions on export of medicines and medical devices, food and agricultural commodities and spare parts and equipment necessary to ensure the safety of civil aviation.

The judges said sanctions on aircraft spare parts have the “potential to endanger civil aviation safety in Iran and the lives of its users”. Tehran has argued that the sanctions violate the terms the 1955 Treaty of Amity. Iranian President Hassan Rouhani has equated the re-imposition of sanctions to “psychological warfare”

The United States is expected to challenge the court’s jurisdiction in a future hearing.