A gay teacher claims he was fired from the Catholic school he worked at for 12 years after applying for a same-sex marriage license.

Michael Griffin, a French and Spanish teacher at Holy Ghost Preparatory School in Bensalem, PA said his sexuality was not a secret at the school.

Griffin said the day he arrived late after applying for his marriage license, the principal of the private boys school told him he had no choice but to fire the teacher.

'I really didn't think that it would happen. At our school we talk about it's a community. Our motto is "One heart, one mind",' said Griffin, according to the Daily Mail.

Griffin, who attended the same school as a child, said he had arranged to come in late that day, but when he returned to work he was called in to see school president Father James McCloskey and principal Jeffrey Danilak.

Griffin says McCloskey and Danilak said it wasn't a secret that he was gay, before saying to him, "I presume this is a same-sex marriage."

After confirming that it was, Griffin was told that the school would have no choice to but to terminate his position if he went through with the marriage.

'I can't believe it's over like that,' he said.

Said his partner, Vincent Giannetto: 'We applied this morning and on the same day he's fired from his job. So it kind of flipped things upside down for us.'

A spokesman for the school said it had no comment.

Griffin thinks he was fired because of the teachers' code of conduct at the school, which reads: "Although, the School welcomes teachers from other denominations and recognizes their rights to religious freedom, as employees of a Catholic institution, all teachers are expected to uphold lifestyles compatible with the moral teaching of the Roman Catholic Church."

Griffin says that although he now needs to find a job, he would be reluctant to work at the school again after the way he was treated.

'The school to me has shown their true colors so I don't know if I... I certainly don't want to work there again after I've seen how they treated me,' he said.