A professor has been sacked after he accidentally beamed porn through a lecture room projector for all his students to see.

The “popular” veteran teacher was in the middle of a lecture at a Zurich business school when he started watching a video on the Pornhub website.

He apparently didn’t realise his laptop was still plugged into the projector, meaning the images were broadcast onto a huge whiteboard.

Download the new Independent Premium app Sharing the full story, not just the headlines

The students also saw that he had been searching for images of naked amputee women, Swiss news site 20 Minutes, reports.

Following the incident, officials at the school decided he had to be laid off.

“I am shocked. After the class, the teacher immediately came to me and told me he had watched porn on a school computer. He was very embarrassed and could not tell me why he did it,” school director René Portenier told 20 Minutes.

Confirming the decision to sack the professor, the school’s chairman, Rolf Butz, said the behaviour was “unacceptable”, but did add that in forty years of teaching, he had “never committed any indiscretion”.