A classroom ban on a Christian school teacher in south-east London who condemned the “homosexual lifestyle” in front of pupils has been upheld by the High Court.

Robert Haye told a Year 11 class of students aged 15-16 at Deptford Green School in Lewisham that gay people’s lives were “disgusting” and a sin.

On another occasion, he told students aged 13-14 “anyone who worships on Sunday is basically worshipping the devil”.

The 43-year-old and his family belong to the Seventh-day Adventist Church, which observes Saturday as the Sabbath.

Following his February 2010 comments, a teaching assistant complained and triggered an investigation.

He was sacked and prohibited from teaching at any school or sixth form college last July after Education Secretary Michael Gove backed a decision by The Teaching Agency.

On Friday, Mr Justice King rejected Mr Haye’s appeal at the High Court, saying the ban was justified because the teacher had shown lack of insight when he made his “inappropriate” comments and was found guilty of unacceptable professional conduct.

Mr Haye can apply to return to the classroom after two years.

The judge said: “This case is not about the right of a teacher to hold sincerely-held beliefs based on the Bible in relation to homosexuality or attendance at church on Sundays.

“It has been about how those beliefs and views are manifested in the context of teaching in schools with young people with diverse sexuality, backgrounds and beliefs.”

The judge said Deptford Green had a policy which made it clear teachers were expected to present positive information about gay people in order “to enable students to challenge derogatory stereotypes and prejudice”.

Mr Haye, now unemployed and facing £4,200 legal costs, complained that his career had been ruined. “I will not recant my beliefs. God comes first,” he said.

“Christians are now being persecuted in this country for believing in the Bible.

“That cannot be. We have a right to believe and express what we believe, but people are now afraid of being punished for not being politically correct.

“This country is a free and democratic society, but is it? Is it really?”