44-year-old former educator Janet Barnes carried on sexual relationships with multiple students.

An Oklahoma high school teacher has pled guilty to having sex with two teenage students for almost three years.

On Tuesday, December 3, Janet Barnes, 44, who once worked as a Pocola High School teacher, copped to two counts of rape and one count of sexual battery, a clerk at the Leflore County District Court confirmed to Oxygen.com.

The woman was first arrested back in May for having sex with the students during a period from January 2014 to November 2016, according to 5NewsOnline.com.

She also pleaded guilty to sexual battery against a third minor in an unrelated incident.

Barnes received a 40-year prison sentence but is expected to be released after 15 years. That's because the second-degree rape charges, which amount to 15 years each, run concurrently.

The remaining 10-year sentence for sexual battery was suspended as part of the terms of her probation, the clerk confirmed, adding that Barnes must register as a sex offender.

Oxygen.com’s attempt to reach Barnes’s defense attorney were not immediately returned.

The convicted woman is expected to serve time at The Mabel Bassett Correctional Center in McCloud, Oklahoma, 5NewsOnline.com reports.

The former educator had been accused of impropriety before when she pleaded guilty to outraging public decency involving a student younger than 16.

That conviction stems from a 2010 incident, where another student attending Smithville Public Schools informed police that Barnes had propositioned him for months to have sex and even sent him nude photos, according to local affiliate CBS46, citing court documents.

The boy aired fears that Barnes was “stalking him,” the television station reported. Barnes was hit with a nine-month suspended sentence and forced to pay a fine.

The woman then reportedly pleaded guilty two years later to violating a protection order, but was spared jail time.