TOKYO — Japan has canceled this year’s whale hunt off Antarctica, just days after an international court ruled against the killings, which had drawn worldwide criticism.

Prime Minister Shinzo Abe said he would comply with the court order, although the ministry in charge of the hunt, which canceled it on Wednesday, appeared to leave Japan some wiggle room for the future. The action leaves open the possibility that Japan will try to revive the program under different legal reasoning next year.

The hunt had taken advantage of a loophole in a 1986 international moratorium on commercial whaling that allowed killings for research purposes. The ruling by the International Court of Justice in The Hague on Monday said the scientific output from Japan’s whaling program in Antarctica “appears limited” and suggested that the hunt was continued because of politics, rather than science.

While the hunt is not widely popular in Japan, it is backed by a vocal group of nationalistic lawmakers who paint opponents as trampling on Japanese culture.