The former Rutgers University student whose roommate killed himself six years ago after being recorded kissing another man pleaded guilty Thursday to a single count of attempted invasion of privacy.

Dharun Ravi, 24, admitted that he activated a secret video camera in order to record his roommate, 18-year-old freshman Tyler Clementi, with the belief that Clementi and another man were preparing to have sex.

Clementi died when he jumped off the George Washington Bridge three days after he learned that Ravi had shared the video with other students. The case drew national attention to the issues of cyberbullying and harassment of gays and lesbians.

The plea deal comes after a New Jersey appeals court last month threw out Ravi's 2012 conviction on 15 counts, including invasion of privacy and bias intimidation. The appellate court decision came after the state Supreme Court last year ruled that the laws under which Ravi was convicted were unconstitutional and that the ruling could be applied retroactively.

Under the plea agreement, Ravi was sentenced to time he had already served in jail under the original sentence, 20 days. He had also done court-required community service and paid a $10,000 fine.

In a statement, Middlesex County District Attorney Andrew C. Carey said, "Had the case been retried and Ravi were convicted a second time, the law would prohibit the court from imposing any sentence that was more severe than the penalties meted out at the original sentencing."

Clementi's parents, Joe and Jane Clementi, issued a statement urging the witnesses to reject cyberbullying and "to become upstanders for those in society like Tyler, who cannot stand up for themselves."

Copyright 2016 NPR. To see more, visit