In response, Iranian Foreign Minister Mohammad Javad Zarif slammed the USA as an "outlaw regime".
"Today marked a useful point, with the decision that was made this morning from the ICJ, this marked a useful point for us to demonstrate the absolute absurdity of the Treaty of Amity between the United States and the Islamic Republic of Iran", Pompeo said.
It was the latest attack on the worldwide justice system by the administration of President Donald Trump, who last month at the United Nations virulently rejected the authority of the global Criminal Court.
Also headquartered in The Hague, the ICC has the power to prosecute individuals for war crimes, crimes against humanity and other violations of global law.
Pompeo announced the withdrawal from the amity treaty with Iran just hours after the ICJ ruled that Washington's sanctions are in violation of the 1955 treaty.
The United States said Wednesday it was quitting an global accord related to the top UN court after the Palestinians challenged the U.S. move of its Israel embassy to Jerusalem.
Earlier, Secretary of State Mike Pompeo said the United States should have pulled out of the treaty of amity with Iran decades ago and said the ICJ it had no jurisdiction of sanctions that he said were essential to USA security interests. While the White House has a strong relationship with Israeli Prime Minister Benjamin Netanyahu, this planning has proceeded without input from the Palestinians, who cut off contact with the U.S.in the wake of the embassy move.
Soon after the announcement, National Security Advisor John Bolton said that the country will also drop out of an optional part of 1961 Vienna Convention on Diplomatic Relations, which allows countries to settle disputes with each other in the ICJ. "We have consistently across Democratic and Republican administrations opposed the admission of Palestine to the United Nations as a state because it's not a state".
The UN General Assembly in 2012 recognised the Palestinian Authority as a non-member observer state, paving the way for it to join global courts.
Iran's Foreign Ministry said the court's decisions "proved once again the Islamic Republic is right and the USA sanctions against people and citizens of our country are illegal and cruel".
Last month, Bolton threatened to impose sanctions on International Criminal Court officials if they prosecute the United States or Israel for war crimes.
Its first article reads: "There shall be firm and enduring peace and honest friendship between the United States of America and Iran".
Gaffney adds that it should not be forgotten that Iran is a state sponsor of terrorism.
The court said the case will continue and the US can still challenge its jurisdiction but no date has been set for further hearings.
The ruling said Washington must "remove, by means of its choosing, any impediments arising from" the re-imposition of sanctions to the export to Iran of medicine and medical devices, food and agricultural commodities and spare parts and equipment necessary to ensure the safety of civil aviation.
President Dwight Eisenhower signed the amity treaty with Iran in 1955, long before the 1979 Islamic revolution that turned the two countries into arch-enemies.