A former Montgomery County high school science teacher was convicted on two counts of sex abuse of a minor after authorities said a student noticed the 38-year-old “up-skirting” her by taking pictures with his cellphone aimed under her skirt.

A judge found the teacher, Todd Michael Scriber of Gaithersburg, guilty on Tuesday, said a spokesman with the Montgomery County Prosecutor’s Office. Scriber faces a maximum sentence of 25 years on each count, said Ramon Korionoff, the office’s spokesman.

Authorities took Scriber into custody shortly after an Oct. 2 incident in his Bethesda-Chevy Chase High School classroom.

Police said a 14-year-old student told investigators she stayed after school to retake a science exam and had approached Scriber to discuss the test. According to a court filing, the teen said Scriber was holding the exam on one leg and a cellphone on the other. At some point, she noticed Scriber was pointing the phone under her skirt and pushed a button to take a picture, the document said.

Todd Michael Scriber (Montgomery County Police Department)

A detective questioned Scriber the following day after the student reported the incident and found several photos of other students on the teacher’s cellphone with most of the photos focusing on teen girl’s buttocks, legs and chests, the court document said. Police interviewed three students — a 16-year-old and two 17-year-olds — who identified themselves in the cellphone pictures and each told detectives they had not given Scriber permission to take the photos, said authorities.

After school officials learned about the allegations, Scriber was immediately put on leave. He is no longer an employee of Montgomery County Public Schools.

Scriber’s sentencing is scheduled for Jan. 24.

Dan Morse and Perry Stein contributed to this report.