A 23-year-old Wisconsin high school teacher allegedly raped a 15-year-old student at her home and exchanged inappropriate Snapchat messages with him for about two months, authorities said.

Talia Jo Warner, who taught health at Somerset High School, could face up to 40 years behind bars for her illicit relationship with the boy, RiverTowns.net reported.

The sophomore told authorities that between October and December of last year, he’d received about 10 photos and videos from Warner — including one that showed her performing a sex act on herself, according to the report.

Police reviewed Snapchat records between the two and found messages that escalated to “sexual talk and behavior” over the months. The pair also discussed exchanging nude photos, though none of the alleged illicit images could be found, the outlet reported.

Warner and the teen had two sexual encounters, including one in the car down the street from his house, police said.

The second allegedly happened on Dec. 14, when authorities say Warner picked the student up from a sporting event and drove him back to her former home in White Bear Lake, Minnesota, where they had sex in her bedroom, the outlet reported.

The student initially denied any inappropriate contact with Warner during an interview with the school but later confessed to law enforcement, according to the report.

Students and a teacher alerted the local school district about the allegations and Warner later resigned, according to the report.

Warner was charged Aug. 28 with second-degree sexual assault of a child, use of a computer to facilitate a child sex crime, child enticement, causing a child older than 13 to view sexual activity, two counts of exposing genitals, pubic area or intimate parts to a child and exposing a child to harmful material.

She made her first appearance Thursday, according to St. Croix County Circuit Court records obtained by the RiverTowns.net.

In a statement obtained by the outlet, the district said it would “not be discussing or commenting extensively” on the matter due to privacy concerns.

“When the District first learned of the potential allegations, Ms. Warner was removed from the classroom and the District undertook a full investigation and has cooperated with law enforcement through this process,” the district said. “District staff appreciate the support of the community during this difficult time, and also want to thank the community for respecting the privacy of the alleged victim.”

School board records obtained by the outlet indicate that Warner’s replacement has been on the job since the beginning of February.

Warner, now living in Lake Elmo, Minnesota, could face decades behind behind bars and a $100,000 fine, according to the report.