Daniel Reilly, 36, sat in a Queens courtroom exchanging long kisses with his wife Annemarie prior to formally accepting a plea deal with prosecutors, the New York Post said Tuesday.
Reilly will spend six months under protective custody at Rikers Island. Upon his release he will need to attend sex offender therapy classes and will remain on probation for 10 years under terms of a plea deal to a second-degree rape charge that was partly intended to eliminate the need for testimony from his victim.
He has also surrendered his teaching license, the New York Daily News said.
Police said Reilly, who was an English teacher at Intermediate School 237, and the girl, now 14, had sex several times in Reilly's home while his wife and young child were away. The two used code words via text message to cover up their affair until the girl's sister found sexually explicit text messages and alerted authorities.
Reilly was taken to jail following the hearing though his formal sentencing isn't scheduled until July.
2014: NFL Cheerleaders [PHOTOS]
Autopsy backs Ferguson cop as critics rip leak