NEW BRUNSWICK - A former Rutgers University student accused of using a webcam to spy on his gay roommate and a male companion has been convicted of several charges of bias intimidation and invasion of privacy in a case that exploded into the headlines when the victim of the snooping committed suicide.

Dharun Ravi, 20, of Plainsboro, shook his head slightly after the guilty verdicts were read for all 15 counts, including bias intimidation - a hate crime that was based on the victim's sexual orientation - and invasion of privacy.

Ravi could face years behind bars and the possibility of being deported to his native India, even though he has lived legally in the U.S. since he was a little boy, for his part in an act that cast a spotlight on teen suicide and anti-gay bullying, and illustrated the Internet's potential for tormenting others.

A jury found that Ravi used a webcam to spy on roommate Tyler Clementi, and that he did it and told others about it because of a bias against homosexuals.

Testimony came from about 30 witnesses over 12 days, including the man seen kissing Clementi. The 32-year-old man was identified in court only by the initials M.B. Ravi himself did not testify, though the jury watched a video of his interrogation by police.

First Assistant Prosecutor Julia McClure says the digital trail Ravi left behind, including a text message in which Ravi said he was using his webcam to "keep the gays away," was invaluable in proving their case.

The case attracted national attention after Clementi committed suicide by jumping off the George Washington Bridge days after the incident in September 2010. Ravi was not charged in his roommate's death.

He is scheduled to be sentenced May 21.

WATCH: Jury reads verdict in Ravi caseVIDEO: Prosecution, Clementi family hold news conference Juror 'very satisfied' with Ravi guilty verdictClementi family speaks out following Ravi trialNews 12 NJ talks Ravi verdict with criminal defense attorneyBreakdown of Dharun Ravi's verdictRavi verdict sends shockwaves through Rutgers campusNo verdict yet in Rutgers webcam spying caseFirst day of deliberations concludes in Rutgers spying caseProsecution finishes closing arguments in Rutgers spying caseLawyer: Dharun Ravi will not testify in his trial

Click here to see the hour-long police interrogation

Prosecution rests case in Rutgers webcam spying trial Tweets under scrutiny, interrogation video played in Ravi trial Expert: Rutgers webcam spy suspect's computer used in chatFriend of defendant takes stand in Rutgers webcam trialMystery man takes stand in Rutgers webcam caseClassmate: Ravi used webcam to record ClementiResident assistant testifies in Rutgers webcam spying case Key witness returns to stand in Rutgers webcam spy case Testimony continues in Rutgers webcam spying case Testimony begins in Rutgers spying case Opening statements in Rutgers webcam spy case Jury selection complete in Rutgers webcam spy case