Iran has sued the United States at the International Court of Justice in a new, if dubious, strategy to nullify the nuclear sanctions reimposed by President Trump, which are starting to inflict pain on Iran’s already troubled economy.

The International Court of Justice, the principal judicial organ of the United Nations, said in a statement on Tuesday that the lawsuit was based on a treaty signed by Iran and the United States more than a half-century ago — well before the 1979 Islamic Revolution that overthrew the American-backed shah and ushered in the prolonged estrangement in relations between the countries.

The United States vowed to fight what it called a “baseless” lawsuit.

Mr. Trump ordered the nuclear sanctions reimposed on May 8 as part of an announcement withdrawing his government from the 2015 nuclear agreement negotiated by Iran and major powers, including the United States, under the Obama administration.

Mr. Trump has assailed that agreement, which lifted the sanctions in return for Iran’s verifiable pledges to use nuclear power peacefully, as “the worst deal,” despite support for it by the other participants, including Britain, France and Germany, major American allies.