A former Houston school police officer was facing 20 years in prison after he was charged with two counts of indecency with a 14-year-old student he was charged with protecting at a local middle school. But after pleading guilty to a lesser charge, his sentencing was surprising light — five years probation, which will be erased from his record if he fulfills the terms, and not having to register as a sex offender.

Former Houston Independent School District officer Jacob Ryan Delgadillo, 30, pleaded guilty to having an improper relationship with a 14-year-old student on Wednesday. According to KPRC, another student reported that the victim told her that she and the officer had oral sex in the girl’s bathroom of the middle school. Delgadillo was also allegedly seen blowing kisses at the girl through a classroom window. Oh, and he allegedly had naked photos of himself — some while partially in uniform and in his office on campus — on his cell phone that he showed the victim.

The Houston Chronicle reports that Delgadillo admitted only to putting his hands on the girl’s genitals. Despite this admission, it apparently wasn’t enough for a judge to decide to put the former police officer in jail or on the sex offender registry. In exchange for his plea, the two felony counts of indecency with a child were dropped.

After resigning from his job in December 2015, Delgadillo was arrested in January 2016. At the time, the school, which did not respond to Vocativ’s request for comment, sent a note home to parents saying that the district “take[s] situations such as this very seriously.” According to the school’s calendar, Delgadillo’s sentence came just a day before classes let out for the summer.

Jennifer Stabe, the girl’s attorney, said the 14-year-old’s family was fine with the outcome, according to the Chronicle. Neither Stabe or Paul Aman, Delgadillo’s lawyer, responded to Vocativ’s request for comment.