Why does Spain think it's entitled to try U.S. officials for war crimes?

From the Nuremburg trials of the Nazi leadership forward, none of the cases in which former government officials have been tried for international crimes are actually precedents for what the Spanish officials are now considering. In countries run by officials who rule by force, commit aggression, perpetrate humanitarian outrages and stand above and out of reach of any domestic law, leaders are sometimes tried by international tribunals. Such countries’ sovereignty is not respected because their own domestic laws — let alone their international legal obligations — do not bind their leaders…

What if a Spanish magistrate doesn’t like the legal analyses prepared by U.S. officials on other subjects, such as nuclear weapons, or the death penalty, or atmospheric pollution, or border security with Mexico? Any of these matters could be the basis for a claim by a creative European jurist that a U.S. official is taking a position contrary to international law as interpreted by right-thinking Europeans.