NORTH BRUNSWICK — Former Rutgers student Dharun Ravi is expected to be released from the Middlesex County jail in North Brunswick on Tuesday morning, having completed 20 days of his 30-day sentence for spying on his former roommate during an intimate encounter with another man in their dorm room.

Ravi received 10 days off his sentence for good behavior as per state regulations, according to Warden Edmond Cicchi.

Ravi was convicted in March of multiple second-degree bias counts for training his webcam on his roommate, fellow Rutgers freshman Tyler Clementi, in September 2010 and then tweeting about what he saw and inviting others to watch a planned second encounter.

Days after the incident, Clementi, 18, committed suicide by jumping off the George Washington Bridge. Ravi, 20, was not charged with causing Clementi's death.

Ravi faced up to 10 years in prison on the second-degree bias counts, but Superior Court Judge Glenn Berman sentenced him to 30 days in the county jail, three years probation and 300 hours of community service.

The Middlesex County Prosecutor's Office filed an appeal of Berman's sentence days after he delivered it, arguing the sentence did not fit state sentencing guidelines that called for a state prison term for second-degree convictions.

Ravi's attorney, Steven Altman, filed an appeal of his client's convictions last week, challenging the constitutionality of the bias intimidation law under which the Plainsboro man was convicted.

Altman is also challenging Ravi's conviction for invasion of privacy, hindering his own apprehension and tampering with evidence.

Both appeals could take upwards of two years before a three-judge panel acts.