Tanya Ramirez, a former teacher and coach at a high school in Corpus Christi, TX, admits that she slept with a 17-year-old student, and pleaded guilty to an improper relationship between teacher and student. But now, Ramirez, 31, is suing the student, Tristian, for invasion of privacy after he, she says secretly, recorded their romp, texted it to 11 of his friends, and then, she says, it was posted online. She is also suing his mom for defamation, after she publicly called Ramirez "a sexual predator" and accused her of sleeping with other students as well.

Ramirez recalls texting with Tristian for three weeks before they arranged for him to come to her house in the middle of the night on May 30, 2014, at which point they say they headed straight to the bedroom for, what Ramirez says was consensual sex. (Seventeen is the age of consent in Texas.)

WATCH: Teacher Who Slept With High School Student: 'I Didn't Think It Was Legally Wrong'

"He had his phone in his pocket and then while having sex, he pulled it out, and I didn't see it. It's only about 10 seconds," claims Ramirez, referring to video Tristian admits he recorded. "When I found out there was a tape, I was in shock. I felt betrayed. We had been talking for almost a month so I trusted him that I could have sex with him and him not say anything, and we could keep it a secret. I do, now, feel that I was set up. I do feel that there was some type of motive or intent to get it out there that he had sex with a teacher."

Tristian, who was not Ramirez's student, says a friend drove him to Ramirez's house and then waited outside for him while he and the teacher had sex.

"When did you decide you were going to record this for posterity?" Dr. Phil asks.

"The reason, like, I recorded it was because I had been drinking before, so I was not really in the right mind. I remember talking to my friend about it, and he was just telling me that if you don't have proof [of sex with Ramirez] then I'm not going to believe you," says Tristian. "But I didn't mean to send it [the video] out. I accidentally sent it in a group message, which I really didn't mean to do."

WATCH: Teacher and Student Recall Night They Had A Sexual Encounter

But Ramirez, whose teaching license was revoked, says the damage is done. "I am taking legal action against both Tristian and his mother for invasion of privacy, videotaping the sexual encounter without my knowledge and then distributing it to his friends, and for emotional distress," she says. "I'm suing the mom because I feel it's not right to call out someone in the media. Now people look at me as a sexual predator. Her son was an adult at the time, and so he chose to have a sexual relationship with me. I want to get justice for what he did to me."

When Ramirez says she wants an apology from Tristian's mom, Kim, she tells Dr. Phil, "I am sorry that my son ever met Tanya Ramirez. That is the only apology that she will get from me."

WATCH: Teen Claims 29-Year-Old Teacher Pursued Him Before They Had A Sexual Encounter

The attorney representing Tristian and his mom asks how a teacher who slept with a student at her school could think she is the one who was wronged. "We offered mutual releases many times," he says. "Everyone release everyone, and let's all go about our lives, and Ms. Ramirez refuses to do that."

He adds, "Why is a teacher having a 17-year-old male student at over 2 in the morning?"

This episode of Dr. Phil airs Monday. Watch more here.