A former Taunton High School teacher convicted of raping two 14-year-old students has been sentenced to up to seven years in prison.

Former social studies teacher Patrick Doyle was also sentenced Tuesday in Bristol Superior Court to five years of probation and ordered to register as a sex offender.

The 36-year-old Doyle, of Seekonk, pleaded guilty last week to two counts of rape of a child and two counts of disseminating harmful material to a minor. By not going to trial, Doyle avoided a potential life sentence.

Prosecutors say Doyle engaged in sexual acts with the girls on separate occasions at his home and an empty classroom in 2012.

Police say he sent explicit photos to both girls as well as sexually suggestive text messages.

More From WBSM-AM/AM 1420