Secretary of State Mike Pompeo said Wednesday that the United States is terminating the Treaty of Amity reached with Iran in pre-revolutionary days, calling it an “absolute absurdity” given the tensions between the two countries.

The impetus for the United States tearing up the treaty was a decision earlier Wednesday in the International Court of Justice, which ordered the Trump administration to lift some sanctions on Iran. The top U.N. court, which is in The Hague, does not have the power to enforce its decisions, which are usually ignored by the United States anyway.

“We ought to have pulled out of it decades ago,” Pompeo said, calling it “39 years overdue” in a reference to the 1979 revolution in Iran. “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.”

The court told the United States that it should lift a number of sanctions that were reimposed after President Trump announced in May that he would withdraw from the landmark nuclear agreement with Iran. A more punishing round of sanctions against Iran’s oil and financial sectors is scheduled to take effect Nov. 4, and the United States is warning allies that they could face secondary sanctions if they continue to do business with Iran.

The court ruling was a moral victory for Tehran, even though it was hoping for a more sweeping decision on the U.S. withdrawal from the nuclear deal. It had argued that U.S. sanctions, which were lifted when the agreement was implemented in 2016, violated the 1955 Treaty of Amity.

“We’re disappointed that the court failed to recognize that it has no jurisdiction to issue any order relating to these sanctions measures with the United States, which is doing its work on Iran to protect its own essential security interests,” Pompeo said.

In an appearance at Wednesday’s White House press briefing, national security adviser John Bolton said that Iran had “made a mockery” of the treaty.

“The Iranian regime has systematically pursued a policy of hostility toward the United States that defames the central premise of the Treaty of Amity,” he said. “The regime cannot practice animosity in its conduct, and then ask for amity under international law.”

He maintained that the Trump administration’s policy is not regime change, “but we do expect substantial change in their behavior.”

Tensions, already high between the two countries, have heated up recently.

The United States has blamed Iran for the launch of two missiles last week that fell near the U.S. Consulate in the Iraqi city of Basra. Last Friday, Pompeo ordered U.S. diplomats to evacuate the mission and relocate. The U.S. military is standing by ready to assist. Though U.S. military officials have said protesters in the city unhappy over shortages may have been responsible, Pompeo said Iran was behind both the Basra incident and a mortar attack near the U.S. Embassy in Baghdad in early September.

“Iran is the origin of the current threat to Americans in Iraq,” Pompeo told reporters at the State Department. “Our intelligence in this regard is solid. We can see the hand of the ayatollah and his henchmen supporting these attacks on the United States.”

Pompeo also called on the Senate to confirm 65 nominees for senior State Department officials that have been held up in committees, some for many months.

Felicia Sonmez contributed to this report.