A Mexican teacher who posted her video confrontation with a student online after the student made obscene comments about her has been suspended from duty.

As a result of the online altercation, the teacher is now on administrative leave and the student has been suspended. The video has gone viral, with hundreds of thousands of views on YouTube.

The eight-minute video gives a glimpse of a lesson that students at the science and technology high school in Mexico's Tamaulipas state aren't likely to forget.

At first, it looks like a typical classroom scene, with students attentively listening as human resources teacher Idalia Hernandez Ramos presents the day's lesson.

For several minutes, Hernandez asks one student to stand up read a statement about social media aloud, then peppers her with questions about how harmful it can be and how people can be prosecuted for what they've posted.

The student mentions possible problems with cyberbullying. "And the destruction of the image of another person?" Hernandez asks.

The student nods vigorously. That's when Hernandez confronts her.

"Knowing that, could you tell me why you wrote this?" she says, handing the student a phone. A long, tense silence follows. The student then admits being the author of the tweet, saying that she was "upset."

Growing visibly emotional, Hernandez tells the student that she's also "very upset." She then points to several other students recording the incident on cell phone cameras and tablets and demands an apology.

"My family saw it (the tweet) and now you're going to apologize in front of these cameras," Hernandez says.

"I made a mistake," the student says in a barely audible voice. "The teacher didn't deserve being called those things."

A fellow student who apparently shared the comments is also chastised by the teacher, who calls them both "cowards" in front of the whole classroom. Hernandez then repeated the words used against her -- b*tch and whore -- in front of the shocked group of students.

"Listen to me well: I will not allow anyone to call me that, especially a young brat like you and you," Hernandez says.

An official at the CBTis 103 science and technology high school told CNN that Hernandez has been temporarily taken out of the classroom while the August incident is investigated.

The 17-year-old student was suspended for two weeks but is back in school, the official said. CNN is not disclosing the student's name because she's a minor.

Debate has surged on social media over the video, with some praising the teacher and others criticizing her for humiliating the student.

The school official, who spoke on condition of anonymity, said that "most of the teacher's colleagues are siding with her." The official also said federal education authorities in Mexico City are reviewing the case.

"It may take up to four months to make a final determination on whether the teacher is fired or not," she said.