MINNEAPOLIS (WCCO) — An Eagan teacher is facing criminal charges for stalking a middle school student via social media, the Dakota County Attorney’s office said Thursday.

Cody Woodrow Hansen, 25, is charged via summons with two counts of stalking a victim under 18.

According to the criminal complaint, the 12-year-old girl was a student in one of Hansen’s classes at Black Hawk Middle School. Charges say he sent her numerous messages from several different usernames from November 2015 to January 2016, which she saved as screenshots. She later turned them over to police.

In the messages, prosecutors say Hansen told the girl she was cute, asked if she’d ever kissed anyone and asked if she liked older men. The student tried to determine who was sending the messages until Hansen admitted he could get into trouble for contacting her, and identified himself as “Mr. H.”

In one exchange, prosecutors say the student told Hansen that what he was doing was illegal and “extremely weird.” She reported the incident to police, saying she didn’t feel safe in Hansen’s classroom.

Authorities say Hansen later admitted to police that he had sent the messages, and that he found the student’s Snapchat username from her Instagram account. He told police he had stopped communication with the student, and “hoped this would all go away.”

In addition to teaching math, a district spokesman says Hansen also spent time as an assistant wrestling coach and assistant ninth-grade football coach At Eagan High School.

Prosecutors say Hansen has resigned his position with the school district. A search on Indeed, a job-finding website, indicates that Hansen recently updated his resume to read that he’s looking for a creative career change allowing him to utilize task-driven skills.

His first court appearance hasn’t yet been set.

Comments