A former Oil City High School teacher will not spend any time in jail after pleading guilty to having sex with a student on school grounds.

Shaun McLoughlin, 39, was sentenced to five years probation for a felony charge of corruption of minors. He must also complete 50 hours of community service within 180 days and was ordered not to have any contact with the victim.

McLoughlin had a relationship with a girl, which started in November 2014. She was 16 at the time.

The two had consensual sex on high school property, both during and after the school day, where McLoughlin worked as a teacher, investigators said.

McLoughlin also met with the girl elsewhere and continued their relationship for several months.

Copyright 2017 Erie News Now. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.