A Patagonia teacher who pleaded guilty to sexting a 13-year-old student was sentenced to 10 years in prison Monday.

Matthew Donald Bentley, 27, will serve the sentence as part of a plea deal he made with the Santa Cruz County Attorney.

Bentley accepted charges of two counts of sexual exploitation of a minor and two counts of luring a minor for sexual exploitation. Bentley exchanged inappropriate text messages with a 13-year-old student in December 2014.

Bentley has already served nearly a year of his sentenced.