The Wisconsin Supreme Court ruled Wednesday that intercourse with a dead person is a crime because there is no consent from the victim.

The decision reached by the justices via a vote of 5-2 reverses the ruling of appellate and lower courts dismissing the sexual assault charges on three men who tried but failed to commit necrophilia in 2006.

The ruling reinstated the charges against twin brothers Nicholas and Alexander Grunke and Dustin Radke, all 22.

The three were arrested and charged with attempted third-degree sexual assault for digging up a corpse at a Cassville, WI, cemetery so one of them could have sex with it. However, the Grant County Circuit Court dismissed the charges after agreeing with the defendants' interpretation of the law that sexual assault is not applicable to a dead person unless the defendant was responsible for the death of the victim.