PITTSBURGH (KDKA/AP) – A Plum High School teacher wants charges that he wrongly had sex with an 18-year-old student dismissed because of her age.

The attorney for Plum High School teacher Jason Cooper filed the motion raising an issue that was rejected at the magistrate level but now goes to the judge who would hear the trial.

The argument is that because the alleged victim was 18, their relationship didn’t break the law.

In April, Cooper was ordered to stand trial on charges, including institutional sexual assault, based in part on the testimony of a female student who described their relationship in court.

At the time, his lawyer said the girl, having turned 18, means whatever allegedly happened was between consenting adults.

“Once an individual turns 18, there is no legislation that exists to restrict the actions of an adult, and who and what they can do behind closed doors,” defense attorney Mike DeRiso said back in April.

The magistrate refused to dismiss the case on those grounds, so the defense filed the motion Wednesday for the trial judge to consider.

They argue that the charge of institutional sexual assault should be dismissed because, in their view, it punishes the right of consenting adults to engage in private sexual conduct without governmental interference.

But the day after the defense raised that issue at the preliminary hearing in April, the Allegheny County District Attorney said not so fast.

“It does not become open season on a student just because that student turns 18,” said District Attorney Stephen Zappala on April 23.

The prosecution contends the law does apply even in this case.

“It is a crime for somebody with a direct contact with a student, school employee or somebody on that campus who has a direct contact with that student, to engage in sexual contact with that student,” said Zappala.

Judge David Cashman will eventually have to decide who is right. The next pretrial hearing in the Cooper case is scheduled for next week.

Cooper is one of two Plum High School teachers charged with having sex with students. A third is charged with intimidating one of the students by allegedly pointing her out in class.

Join The Conversation On The KDKA Facebook Page
Stay Up To Date, Follow KDKA On Twitter

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)