Iran intends to take the United States to the International Court of Justice (ICJ) at the Hague over the U.S. Supreme Court–backed freezing of an estimated $2 billion of its assets. Yet behind this commonplace legal maneuver is an unusual reality. The ICJ typically only has jurisdiction over disputes between states when both states agree to accept its authority to render a verdict on that case. Yet the United States and Iran don’t agree on much these days—indeed, they’ve been at each other's throats for forty years. How is it that they concur on this?

In fact, the two rivals concurred on this a long, long time ago. Despite many bitter incidents on both sides since the 1979 revolution, they have a treaty in place which according to international law is still valid: the 1955 U.S.-Iranian Treaty of Amity, Economic Relations and Consular Rights .

The treaty was signed two years after the 1953 Coup . The Coup was orchestrated by the British government and America’s Central Intelligence Agency in order to put the Shah back in power and collapse the nationalist government of Iran under Mohammad Mosadegh that had nationalised the Iranian oil industry.

The history of such agreements between the US and other countries goes back to the eighteenth century—in 1778, the United States signed agreements of amity and commercial relations with France. Ever since those agreements, it became a norm for U.S. governments to put such treaties in place with other countries in order to facilitate and simplify investments and commercial activities and to solidify political relations.

The U.S.-Iranian Treaty of Amity was signed by the two countries in 1955, during the terms of U.S. president Dwight Eisenhower and Iranian prime minister Hossein Ala. The treaty came in a period when Iran was trying to attract foreign investors through a variety of means, such as a “Law of Attraction and Support for Foreign Investment” passed by the Iranian parliament.

The treaty consists of an introduction and twenty-three articles. It emphasizes friendly relations while encouraging mutual trade and investments and regulating consular relations. The treaty was signed by Mostafa Samiy (the Iranian deputy of the ministry of foreign affairs) and Selden Chapin (the ambassador extraordinary and plenipotentiary of the United States) at Tehran just a week before the second anniversary of the 1953 Coup. The treaty came into force in June 1957, one month after the day of exchange of the instruments of ratification at Tehran. Ever since, it’s provided the legal framework for bilateral relations between Iran and the United States.

Clause 2 of Article XXI of the treaty establishes the ICJ’s role: “Any dispute between the High Contracting Parties as to the interpretation or application of the present Treaty, not satisfactorily adjusted by diplomacy, shall be submitted to the International Court of Justice, unless the High Contracting Parties agree to settlement by some other pacific means.” In other words, consent from either side should suffice to take a case to the ICJ.

Why is the treaty still valid?

In November 1979, some twenty-two years after the treaty came into effect, the hostage crisis at the American embassy took place. Within a few months—in April 1980—Washington cut political ties with Tehran and a few days later conducted a military operation in Iran in order to free the hostages which failed due to technical and climate reasons.

It was then that the first round of U.S. sanctions against Iran was imposed and all Iranian assets in the United States were frozen.

That was the beginning of an era of tensions and unfriendly actions, every one of which was clear violation of the treaty’s commitment, in Article I, that “There shall be firm and enduring peace and sincere friendship between the United States of America and Iran.” These incidents could have led to the annulment of the treaty or the departure of either party. Yet in spite of all tensions, incidents and conflicts of interest over the last four decades, there is no legal evidence against the validity of the 1955 treaty.

During the first few years after the 1979 revolution, Iran would not make legal reference to the treaty in order to avoid any suggestion that there was any tendency towards renewing relations with the United States. The American side quickly broke that taboo when it went to the ICJ referring to the same treaty during the hostage situation, asserting that Iran had gone against Article II, Clause 4 of the treaty, which promises that “Nationals of either High Contracting Party shall receive the most constant protection and security within the territories of the other High Contracting Party.” The court returned a verdict of immediate freedom of the hostages, also referring to the Treaty of Amity. This confirmed the validity of the treaty in their eyes .

Less than a decade later and after an American warship attacked an Iranian passenger plane , killing all 290 people on board, Iran took the US to the ICJ, citing Clause 2 of Article XXI. This was accepted by the court . (Tehran and Washington ultimately settled the matter outside of court.)

The second time Iran took America to the ICJ citing the treaty was in November 1992 over U.S. attacks on Iranian oil rigs in the Persian Gulf in 1987 and 1988. The United States brought a counterclaim against Iran for “mining and other attacks on U.S.-flag or U.S.-owned vessels” in the same period.

In both instances, the court cited the 1955 Treaty of Amity and confirmed the validity of the treaty in handling the cases. The Iran-US Claims Tribunal , which handled disputes between the two countries tied to the hostage situation, has also cited the 1955 treaty in at least twenty-seven verdicts.

Neither of the two countries has ever used Clause 3 of Article XXIII of the treaty that outlines termination terms and conditions (“Either High Contracting Party may, by giving one year's written notice to the other High Contracting Party, terminate the present Treaty at the end of the initial ten-year period or at any time thereafter.”). On the contrary, they both have accepted ICJ verdicts in accordance with the terms and clauses of treaty and have cited the treaty themselves when taking the other party to court.

To this effect, and in a virtually unprecedented situation in the history of international law, two countries who have cut political ties and have been subject to unfriendly and hostile actions from each other for over four decades actually have a living Treaty of Amity in place. Based on it, they can legally challenge any violations of “friendly relations” and demand behaviors in line with international conventions.

Someday—and it doesn’t look like that day will come soon—Iran and the United States will recommence political relations. Until that day arrives, it is a great benefit that there is an agreed mechanism in place to help resolve disputes when diplomacy proves futile. We may not be witnessing the “firm and enduring peace and sincere friendship between the United States of America and Iran” that the two sides envisioned when they signed on, but the 1955 Treaty of Amity still has a role to play.

Farshad Kashani is an international law expert and international legal affairs analyst. He was also the Editor In-Chief of Iranian Diplomacy . Farshad Kashani is currently writing a book about the P5+1 and Iran's interpretation of the Non-Proliferation Treaty (NPT) and its legal impacts on the regime's future. On Twitter: @FarKashani .