Splitting into odd ideological camps, the Supreme Court on Monday ruled that the Constitution’s ban on after-the-fact lawmaking invalidated a conviction against a Texas man accused of sexually assaulting his stepdaughter.

Justice John Paul Stevens, dusting off an 18th century Supreme Court definition of ex post facto laws, wrote for a majority made up of traditional conservatives Antonin Scalia and Clarence Thomas and moderates David Souter and Stephen Breyer.