The International Court of Justice (ICJ) has ruled that Iran can proceed with a legal action to recover billions of dollars in frozen assets that the United States says must be paid to purported American survivors and relatives of victims of attacks spuriously blamed on the Islamic Republic.

On Wednesday, judges at the Hague-based tribunal dismissed Washington’s allegations the case should be thrown out, and that the court did not have jurisdiction in the lawsuit.

The US Supreme Court ruled in April 2016 that the $2 billion in frozen Iranian assets must go to victims of attacks, including the 1983 bombing of US Marine barracks in Beirut, without corroborating its allegations of Iran’s involvement.

Iran first lodged the case on the cash in June that year, stating that the US decision had breached the Treaty of Amity, Economic Relations and Consular Rights, which the two countries signed in Tehran before the victory of the 1979 Islamic Revolution in Iran and severance of diplomatic ties between the former allies.

Tehran also argued that Washington had illegally seized Iranian financial assets and those of Iranian companies.

Last October, Iran won a legal victory when the ICJ ruled that the US must lift sanctions against Tehran targeting humanitarian goods such as food and medicine.

US Secretary of State Mike Pompeo said in response that Washington was pulling out of the 1955 treaty with Tehran.

US National Security Adviser John Bolton also announced that his country was leaving the 1961 Optional Protocol and Dispute Resolution to the Vienna Convention, which establishes the ICJ as the "compulsory jurisdiction" for disputes unless nations decide to settle them elsewhere.

The frozen Iranian assets were reportedly part of the Central Bank of the Islamic Republic of Iran’s foreign currency reserves held in Citibank accounts in New York.

The US District Court for the Southern District of New York, acting on information provided by the Treasury Department, ordered Citibank to freeze the money in June 2008.

In an interview with The New Yorker published on April 25, 2016, Iran's Foreign Minister Mohammad Javad Zarif said the seizure of Iran's frozen assets by the US was “highway robbery,” vowing that the Islamic Republic will retrieve the sum anyway.