A former Catholic schoolteacher who maintained a monthslong sexual relationship with one of her students was sentenced to 15 years’ probation Thursday.

Mary F. Gilles, 28, of Austin, Minn., pleaded guilty to two felony counts of criminal sexual conduct for her relationship with a 17-year-old student. Gilles’ probation comes with more than 20 conditions, including registering as a predatory sex offender, no contact with minors or the victim and no Internet access without permission. If she violates the conditions of her sentence, Gilles could face four years in prison.

Gilles began having sex with the student at Pacelli High School in Austin in February 2014, according to charges. The student was 17 at the time. Sexual activity between the two stopped over the summer and picked up again in September, the charges said.

A school administrator told police that a staff member had seen Gilles and the student late one evening in the school auditorium. The administrator accessed the student’s school e-mail account and found nothing suspicious, but found the password to his personal e-mail, where she uncovered e-mails with “sexual relationship content,” the charges said. Gilles was arrested and fired from the school in October.

Some of the last e-mails between the two revealed that Gilles may have been pregnant at the time of her arrest. Court documents do not show whether that turned out to be true.

Gilles told investigators that she and the student had sex once a month.

Gilles’ lawyer was not available for comment Friday.

Anne Millerbernd is a University of Minnesota student on assignment for the Star Tribune.