New Delhi, Aug. 1 -- LIMA - On the morning of August 1, Ollanta Humala walked out of Barbadillo prison in eastern Lima, a free man.

That fact alone would have seemed improbable eighteen months ago, when Peru's judiciary handed him a fifteen-year sentence for money laundering and sent him to the same detention facility that has held several of his predecessors. Peru's constitutional court, in a ruling published Friday, declared the entire criminal proceeding against the former president null and void. Not overturned on appeal. Not reduced on mitigating factors. Erased.

The ruling turned on a legal principle that rarely survives the political heat around corruption prosecutions: the conduct Humala was convicted of did not meet the definit...