MATTAWA, Wash. – A Washington high school teacher resigned amid criminal charges after police said he met up with a student for a gay rendezvous and the victim attempted to extort money or a grade change not to reveal the encounter.

Wahluke High School teacher Michael Smith, 45, allegedly used the social networking app Grindr to arrange a sexual rendezvous with a 17-year-old male student after exchanging dirty talk and a nude picture, the Columbia Basin Herald reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

The two allegedly coordinated a hook-up at a home in Mattawa during the school lunch hour May 25 in which the boy agreed to wear a blindfold and have sex with Smith. The teen did not know the teacher’s identity, but the app showed the man was at the school. The two were engaged in the act when the student’s friends stopped by and recognized the teacher, who dashed off, according to police reports.

The friends told the student what they saw and described what Smith was wearing. The student told police Smith was wearing the same clothes when the student confronted him at the school store the next day, police allege.

Smith, who went by “Daddy” on Grindr, allegedly admitted to the student that he was the man at the hook-up before taking the boy to a store room to perform oral sex on him, KHQ reports.

Police contend the student became upset and started making demands to keep their sexual encounters under wraps. Smith admitted to his misdeeds during the police investigation, though he said the student demanded that he perform oral sex at school.

“Mike explained (the victim) demanded he pay him between $50 and $200. Mike told him he didn’t have money to spare and then (the victim) demanded he change his grades,” the investigator wrote in the police report. “Mike told him no and the (victim) grabbed a bag of Cheetos and left the store.”

School surveillance video confirmed Smith and the student entered the storeroom. Smith was an instructor and director of the Career Technical Education program at the high school.

MORE NEWS: How to prepare for face-to-face classes

Wahluke School District officials posted a very brief statement about the incident to the district website.

“The School District is aware of the allegations and is cooperation with the police investigation,” it read. “This employee has resigned. We can not comment any further.”

Police arrested Smith last week on two counts of first-degree sexual misconduct with a minor, and one charge of communicating with a minor for immoral purposes, KHQ reports.