A university professor was left red-faced after accidentally beaming porn through a lecture room projector for all his students to see.

About 500 students had turned up for an introductory psychology class taught by professor Steve Joordens but instead got an explicit lesson in human anatomy and sexual behavior.

Footage taken of the mortifying debacle shows shocked students, aghast at the spectacle of porn coming on by mistake and seemingly taking a good few, excruciating seconds to rectify.

Some found it hilarious, while others can be seen getting up to leave.

The blunder happened during the lecture at the University of Toronto’s Scarborough Campus, where the professor inadvertently screened the porn to the packed hall Monday morning, according to reports.

The campus newspaper The Varsity said one of the students reportedly recorded the mishap on Snapchat and posted it elsewhere online, where unsurprisingly it was shared many times.

The university said it was offering support to anyone who was disturbed.

Spokesman Don Campbell told City News: “We can’t discuss personnel matters.”

“But, we are aware of the situation and are encouraging students who are feeling unsettled to speak with staff at the Health & Wellness Centre.”