Twitter can be a breeding ground for hateful comments, especially homophobia, biphobia and transphobia.

One University professor was more than miffed when he was scrolling through the social platform and stumbled across tweets from one of his students.

The student had been using the platform as a voice for his homophobia.

Some of the vile homophobia was aimed at his genetics teacher, Eric Mendenhall

Mendenhall is an assistant professor of Genetics at the University of Alabama.

His student wrote about Mendenhall “My genetics teacher is a faggot”.

Clearly, he didn’t ever expect his teacher to come across the hateful comments

However, Mendenhall couldn’t let the comments slide and decided to act on the homophobia.

Taking to Twitter, he confronted the student.

“I don’t condone the use of that term and it has no bearing on my ability to teach you genetics [student’s twitter handle]. See you Thursday,” he wrote.

The cool and collected response has since gone viral

Over 30,000 people shared and liked Mendenhall’s tweet, with hundreds of people praising the professor’s response.

After going viral, the teacher added that he felt compelled to call the student out in hopes of fighting future homophobia.

He wrote: “each generation shedding some of the hate and bigotry of their parents’ generation is a key part of being human”.

The student was obviously mortified

Within hours of Mendenhall calling him out, he had deleted his account.

Many continued to criticise the “stupid” actions of the student who had followed the teacher as he posted the offensive tweet.

Other’s celebrated the teacher.

“PRO TIP, don’t tweet horrible things about people on the google machine,” one person wrote.

“Great example of a teacher teaching. I doff my hat to you,” another added.

The teacher continued to prove his brilliance

Despite the horrible tweet, Mendenhall insisted that it would go no further than the platform.

“I promise this has no bearing on grades,” he wrote.

He also added that if the homophobia were directed at a student rather than a teacher then it would be further condoned.

Someone asked: “Is hate speech tolerated at this school?”

“Absolutely not. In no way shape or form. If directed at one of my students I don’t respond in same way as above,” Mendenhall responded.