Ravi's prosecution under a bias-crime law that has now changed tainted the rest of his trial, an appeals court says. The charge involved webcam spying on Clementi, his gay roommate, who killed himself shortly afterward.

An appellate court has overturned Dharun Ravi’s conviction on charges related to his webcam-spying on his gay roommate, Tyler Clementi, who committed suicide shortly afterward.

A three-judge panel of the Appellate Division of the Superior Court of New Jersey ruled today that Ravi should not have been charged under the state’s bias-crime law — a portion of which was subsequently invalidated by the state Supreme Court in a different case — and that his prosecution on these charges “tainted the jury’s verdict on the remaining charges,” and therefore Ravi did not receive a fair trial, The New York Times reports. The appeals court ordered a new trial.

Clementi and Ravi were roommates at Rutgers University in New Jersey in the fall of 2010. Ravi used a webcam to spy on Clementi’s intimate encounter with another man September 19 of that year. Three days later, Clementi, an 18-year-old freshman, ended his life by jumping off the George Washington Bridge between New York and New Jersey, into the Hudson River. His body was found a week later.

In 2012, Ravi was convicted of bias intimidation, invasion of privacy, tampering with evidence, and other charges. He was sentenced to 30 days in a county jail, three years of probation, and 300 hours of community service — penalties that some observers said were too light. He has already served all those sentences, although he was released from jail after 20 days because of good behavior. Ravi’s friend and fellow student Molly Wei, who also participated in the webcam viewing, was charged with invasion of privacy in the case but struck a plea deal, agreeing to testiify for the prosecution and perform community service.

The New Jersey bias-crime law differed from others in the U.S., the Times notes: “It said defendants could be convicted if their victims ‘reasonably believed’ that they were harassed or intimidated because of a characteristic such as race or sexual orientation.” However, last year the state Supreme Court struck down that portion of the law, saying it was the defendant’s intent that mattered, not the victim’s perception.

Even while overturning Ravi’s conviction, the appellate court denounced his actions. “The social environment that transformed a private act of sexual intimacy into a grotesque voyeuristic spectacle must be unequivocally condemned in the strongest possible way,” Judge Jose Fuentes wrote for the court.

The case spotlighted cyberbullying and LGBT youth suicides, and Joe and Jane Clementi, Tyler’s parents, set up a foundation to fight bullying. The Clementis posted this reaction to the appeals court’s decision on the foundation’s website:

“Joe and I are not legal experts so we cannot interpret the law. All we can do is try to understand and deal with are the facts as we know them now. “We know that Tyler’s private moments were stolen from him and used to humiliate him. His life was forever affected and the lives of those who knew and loved him have been forever changed. “In light of today’s decision, we will do what we encourage all people to do before they push that send button, and that is to pause and consider the implications of their message. Does it encourage and build someone up or does it destroy and harm another person? “Our world moves very fast which pushes us to be impulsively spontaneous and sometimes harsh. “Today’s decision shows us how much more work there is to be done, and will push us forward with stronger determination to create a kinder more empathic society where every person is valued and respected. We will continue to work even harder sharing Tyler’s story through the Tyler Clementi Foundation and our many partners.”

Prosecutors in Middlesex County, where the case was heard, have 20 days to decide whether to appeal today’s decision to the state Supreme Court, reports NJ.com, a website for several New Jersey newspapers. “It’s far from over,” Steven Altman, an attorney for Ravi, told the site, although he said he was pleased with the ruling. The prosecution and the defense, he added, may be able to “work something out in a mutually acceptable way.”