A former Rutgers University student who used a computer webcam to spy on his roommate has been found guilty of anti-gay intimidation, a hate crime in New Jersey that could carry a prison term of up to 10 years.

In addition to this "bias intimidation" ruling, Dharun Ravi was also found guilty of privacy invasion for exposing the roommate's sexual encounter using the webcam. The New Jersey jury also convicted Mr. Ravi of tampering with evidence.

The roommate, Tyler Clementi, committed suicide within days after learning that Ravi had said publicly via Twitter that "I saw him [Clementi] making out with a dude. Yay." The two had just started their freshman year at Rutgers.

Ravi's case drew national attention as a possible act of cyberbullying, bringing together concerns about animosity toward gays and about the rising prominence of social media forums like Twitter in daily life.

Although it's possible Ravi could get parts of the verdict overturned on appeal, legal analysts say the verdict sends a powerful message about the importance of respecting privacy rights – and watching what one says online.

"We still have an expectation of privacy, even in a social media age," says Bradley Shear, a Maryland attorney who specializes in privacy law. The case also stands as a warning, he says, that "the balance of your life can change in 140 characters or less."

A single Twitter post can be no more than 140 characters long, yet at least two such tweets figured prominently in Ravi's case.

In the first, Ravi announced witnessing the kissing, which he and a friend saw while remotely logged into his computer's video camera.

Two days later, when Clementi asked for a second night of privacy in the dorm room, Ravi told friends via a public Twitter message: "I dare you to video chat me between the hours of 9:30 and 12. Yes, it's happening again."

Even though no viewing of intimate activity occurred that night, and Ravi himself was at a sports practice, prosecutors said the tweet showed Ravi's intent to violate the privacy of Clementi and his friend, known in the trial as M.B.

Prosecutor Julia McClure said no viewing occurred that night because a worried Clementi shut down Ravi's computer in the room.

Although the evidence of privacy invasion may have been clear-cut, the jury's verdict on so-called bias intimidation was surprising to many observers of the trial. In part, that's because Ravi didn't seem like the archetypal antigay bully.

The prosecution didn't present evidence that he had made intimidating comments directly to his roommate, for example, or that he disparaged gays when talking with his friends.

But drawing on text messages between Ravi and his friends, as well as on Ravi's actions, the prosecution built a case that was strong enough to persuade the 12 jurors that the privacy invasion was motivated by Clementi's sexual orientation.

To prove guilt, the prosecution also had to show that Clementi felt intimidated by Ravi. Ms. McClure pointed out that Clementi was keeping a wary eye on Ravi's Twitter posts, and he consulted with a resident adviser about switching rooms and seeking to have Ravi punished for the privacy violation.

Ravi was not charged with being responsible for Clementi's death, but unless the verdict is overturned on appeal, he will serve a prison sentence of some length, says Robert Honecker, a defense attorney at Ansell Grimm & Aaron in Ocean, N.J.

Clementi's family has argued against a harsh punishment for Ravi, a factor that the judge will weigh.

Tyler Clementi's father, Joe Clementi, also made an appeal to young Americans after the verdict, stressing the importance of civility and tolerance: "You're going to meet a lot of people in your life," he said, according to the Associated Press. "Some of these people you may not like. Just because you don't like them doesn't mean you have to work against them."

Legal experts have criticized New Jersey's bias intimidation law as overly vague, and as opening the door to potentially harsh sentences when a bias charge is tacked on to relatively minor crimes.

An appeal could challenge whether the jury properly applied the statute, Mr. Honecker said. The legislature, separately, may consider revising it for greater clarity.

Jurors had to decide on multiple points of law. While convicting Ravi of at least some portion of all 15 counts against him, they found him not guilty of some sections within certain counts.

But Shear says the jurors spoke loud and clear about the importance of privacy within homes and bedrooms. And he says the case may be a landmark one in reminding Americans of the role that electronic data can play in court.

"This proves how powerful digital evidence can be," he says. Viewing computer records or the text of a tweet "helps crystalize people's impressions."