A former Florida middle school teacher pleaded guilty Tuesday to having sex with a 14-year-old student in a barn and in her vehicle.

Stephanie Peterson, 27, of New Smyrna Beach, pleaded guilty to one count of lewd or lascivious battery sex act with a child and one count of transmission of harmful material to minors by electronic means as part of a plea deal she accepted to receive a lesser sentence, the Daytona Beach News-Journal reported.

Deputies arrested Peterson, a former teacher at New Smyrna Beach Middle School, in February.

The former middle school teacher allegedly picked up the eighth-grade boy at his residence before going off to have sex in her house, her car, and later a barn behind the student’s house.

The sexual encounters took place between November 2017 and January, according to court documents. Peterson faces a minimum sentence of five years behind bars but could face up to ten years in prison at her sentencing. Peterson will also have to register as a sex offender.