PLANO, Texas -- Investigators say an encounter on the social media platform Snapchat led to a sexual relationship between a Texas math teacher and a 16-year-old student, reports CBS affiliate KHOU.

Alaina Ferguson, 23, was arrested and charged with sexual assault on Nov. 30, after authorities discovered the alleged relationship.

The 16-year-old student told police that he wrote his Snapchat user name at the top of a test while in Ferguson’s algebra class at Plano Senior High School, according to court documents. Ferguson allegedly replied via the social media app, and the two met a few days later and had sex on a park bench, the alleged victim told police.

Get Breaking News Delivered to Your Inbox

Police allege that between one and two weeks later, the teen and a friend went to Ferguson’s apartment, which she shared with her fiancé, who was away for the weekend. Ferguson and the teens ate pizza and played beer pong, the alleged victim said, and he and Ferguson allegedly had sex while his friend took the dog for a walk.

“Ms. Ferguson told [the student] that she knew it was not the right thing to do, but it felt right at the time, and that she was going to break it off with her fiancé because she didn’t feel anything with him,” an investigator wrote in the court documents.

The teen and Ferguson had sex in the same apartment on several occasions during their relationship, the victim told officers. The most recent occurrence was in the back of his pickup truck after a football game on Nov. 4.

Ferguson was released from jail on Dec. 1 after posting a $100,000 bond. The Plano Independent School District said Ferguson was hired in August of this year and resigned in October.