A teacher has been struck off for two years after telling pupils that "Hitler wasn't all bad - he killed the Jews, the gays and the disabled".

David McNally also told a third-year Religious Education class at Kilwinning Academy, Ayrshire, last November that he would "rather have been a prison warden or a child abuser", the General Teaching Council (GTC) said.

The supply teacher was found to be unfit to teach at a GTC hearing.

His comments were brought to light when pupils complained to their parents, who contacted the school.

Mr McNally did not attend the hearing but accepted he had made the remarks in his written submission to the hearing. He said he was having a "particularly bad day" and had made the comments in a "general sense".

The GTC panel rejected his suggestion.

The Hitler comments were said to a Higher class in which he also asked pupils: "Did you have sex at the weekend?"

The panel heard he told a third year class: "I love my mobile phone because I can sit and watch porn on it."

He was also reported to have said: "I have a part-time job at a children's home - they have taught me how to whip a child with a wet towel without leaving a mark."

Mr McNally cannot reapply to teach for two years.