A Wichita high school teacher faces criminal charges for stalking and molesting a student over several years, and court records show it all started when he swiped the girl’s phone number from school records.

An affidavit by Wichita police alleges former Wichita Collegiate School teacher Rodney Wren started text messaging a sophomore student in 2014 and goaded the girl into a sexual relationship the following year, when she was a junior, The Wichita Eagle reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

The girl told police Wren first rubbed the inside of her legs over her clothes in a school parking lot, which evolved into rendezvous at hotel parking lots for kissing and touching. Eventually the teacher wanted nude pictures over Snapchat. During the student’s senior year, the Wren would lock his windowless classroom for sexual touching and oral sex on “most days,” according to the affidavit.

Wren’s victim told police she repeatedly attempted to end the relationship when she moved away to college, but Wren wouldn’t leave her be and would drive to her school and tell his supervisors “he was attending a conference,” records show.

“Every time he would travel she felt bad as he was spending so much money to continue their physical relationship so she allowed it to continue,” the affidavit read.

The student eventually insisted on ending the relationship, and Wren allegedly responded with a video of himself with a pistol in his mouth, threatening suicide. The student filed a restraining order against him in May 2018, but Wren emailed in February 2019 begging to reconnect.

The victim told police she decided to come forward about the relationship after consulting with a friend and realizing Wren could “do these things to someone else,” according to the affidavit, which quotes several of the teacher’s online love letters.

Amid the turmoil, Wren ran an unsuccessful bid for Wichita City Council’s District 2, KWCH reports.

MORE NEWS: How to prepare for face-to-face classes

Wichita police arrested the 39-year-old teacher on Feb. 7 after officers visited his classroom and confiscated his school-issued laptop and 26 storage devices, the Eagle reports.

Wichita Collegiate School initially placed Wren on administrative leave during the investigation and fired him when he was arrested.

“Our school has zero tolerance for any unprofessional conduct that falls below the standards we expect from our employees,” district officials said in a prepared statement. “The safety of our students is, and always will be paramount.”

Wren’s lawyer, John Rapp, told the Eagle he “intends to vigorously defend” his innocent client.

“In a statement, Wren’s attorney says he ‘hopes the community will withhold judgement until Wren has had the opportunity to tell his side of the story in court,’” according to Wichita Collegiate School.

In Kansas, it’s illegal for teachers to have sexual relationships with students, even students above the age of consent.

Wren was released from jail on bond the day after his arrest to undergo an emergency mental evaluation and remains free.

His bond prohibits him from contacting any child under 16 without an “authorized responsible adult” present, the Eagle reports.