A male teacher has been fired from his school after it emerged he was in a relationship with another man.

Craig Campbell was a supply teacher at South Coast Baptist College in Rockingham, Australia, for three years, until he was suddenly dropped from the list of teaching staff in mid-October.

Campbell had attended the school as a child and enjoyed being able to teach at the school too, but found he was struggling to hide the fact that he was in a same-sex relationship.

Speaking to Out in Perth, he explained how it was at a relative's wedding that he reached a breaking point.

"We went to my aunt's wedding, and there were three kids from my school in the back of the room.

"It got to this point where I was like, 'I can't hide this anymore.'"

A photo posted on social media also raised suspicions about his sexuality among staff at the school.

But he later found out that he had been dropped from a list of official staff members.

"I told them I was in a relationship, and obviously this is something that I believe is fine from both a moral and a theological standpoint." Campbell said.

South Coast Baptist College principal Des Mitchell said that Campbell was no longer working at the school following a "respectful journey of understanding".

However, he added that gay relationships went against the morals and ethos of the school.

Mr Mitchell said: "The image he posted created interest in his personal life, including his sexuality. I shared with him that, at present, there is an inconsistency with his beliefs on sexuality and the college's beliefs."

There was added controversy in the way that Campbell was fired, as he was told informally by colleagues rather than through the usual formal procedure.

A loophole in law in Western Australia means it is legal for schools to fire gay members of staff if they are a religious site.