Nuremburg is the most recent precedent, but probably the earliest and closest precedent is the trial and execution of King Charles I of England in 1649. The Court faced very similar problems to the current situation in Iraq in trying to define in domestic law a crime that could be committed by a ruler that was himself the source of all law.
The government of the day had similar objectives, they could have easily and legally executed Charles I under the rules of martial law, but after a bloody civil war they wished to have a trial that would establish once and for all the limits of a ruler's power in order to ensure that the rights of a people against a dictator would be established and preserved.
The indictment spelled out the duties of ruler (even a King) being:
"Trusted with a limited power to govern by and according to the laws of the land and not otherwise: and by his trust, oath and office being obliged to use the power committed to him for the good and benefit of the people, and for the preservations of their rights and liberties"
It went on to state:
"Much innocent blood of the free people of this nation has been spilt, many families have been undone, the public treasury wasted and exhausted, trade obstructed and miserably decayed, vast expense and damage to the nation incurred, and many parts of this land spoiled, some of them even to desolation."
It created the concept of command responsbility:
"Charles Stuart has been and is the occasioner, author, and continuer of the said unnatural, cruel and bloody wars, and therein guilty of all the treasons, murders, rapines, burnings, spoils, desolations, damages and mischiefs to this nation, acted and committed in the said wars or occasioned thereby."
And created the crime against natural justice of "Tyranny"
"And the said John Cooke on behalf of the people of England does for the said treasons and crimes impeach the said Charles Stuart as a tyrant, traitor, murderer and a public and implacable enemy to the Commonwealth of England and prays that the said Charles Stuart, King of England, may be put to answer all and every of the premises and that such proceedings, examinations, trials, sentences and judgements may thereupon be had, and as shall be agreeable to justice." [Quoted from The Tyrannicide Brief - Geoffrey Rpbertson (2005) - a book on the life of John Cooke and the reforms he pioneered]
It might be old law, but it was (briefly) good law based on an embryonic philosophy that was later to inspire the US constitution and Bill of Rights.