NEW YORK — An Indian student who was convicted of illegally filming his gay roommate on a webcam was released Tuesday 10 days early for good conduct and time worked, a prison official said.

Dharun Ravi, age 20, served 20 days of a 30-day sentence in a case that sparked a national debate over cyberbullying and gay bashing.

Federal authorities, meanwhile, said the Indian national, who came to the United States at the age of five, would not be deported back to India.

"Based on a review of Mr. Ravi's criminal record, Immigration and Customs Enforcement (ICE) is not initiating removal proceedings at this time," Ross Feinstein, a spokesman for the agency, said in an email.

Ravi filmed his roommate at Rutgers University, Tyler Clementi, age 18, remotely with a Web camera, inviting friends to watch Clementi kissing another man in September 2010.

Ravi alerted Clementi that he was being watched via Tweet, at which point Clementi shut off the Web cam.

A few days later, Clementi committed suicide by jumping into New York's Hudson River.

Ravi, who has since stopped his studies, was not accused of his roommate's suicide, but rather of invasion of privacy and intimidation.

He was released on parole for three years and must complete a total of 300 hours of community service. Ravi was also fined 11,000 dollars.