An effort to toss the lewdness case against convicted child rapist Wayne Chapman was rejected Wednesday, with the judge declaring there’s enough evidence against the serial sex offender to send it to the jury as soon as Thursday.

Chapman, 71, is on trial for allegedly exposing himself and masturbating in front of prison staffers inside the MCI-Shirley health services unit last summer. He has served 30 years in prison for sexually assaulting as many as 100 boys. He is being held on $25,000 bail.

Middlesex Superior Court Judge Maureen Hogan rejected a defense motion to dismiss the case, saying there was evidence to prove without a reasonable doubt that Chapman’s actions were both alarming for the prison witnesses and that the court could assume Chapman was committing sexual acts in front of the hospital staff.

Those alleged offenses occurred June 3 and June 4, 2018, with Chapman allegedly exposed from the waist down, refusing to get dressed, the prosecution has said. On the second day, he allegedly masturbated in his diaper in front of prison hospital staff throughout the afternoon, prosecutors added.

Chapman’s defense attorney Melissa Devore argued the state could not prove without a reasonable doubt that the acts were done intentionally and that the actions were enough to cause shock and alarm. She added he “wasn’t capable of covering himself” due to his Parkinson’s disease.

Prosecutor Emily Jackson argued that Chapman didn’t “take measures to secure his privacy” and that every time someone asked him to cover up, he exposed himself more.

Most of Wednesday focused on security footage from June 3 and June 4, with the prosecution bringing in Lt. David Havens, a special investigator with the Department of Correction to show the jury the footage. The defense also played surveillance video from the prison on June 3.