A Mount Laurel teacher at a suburban Philadelphia Catholic high school was fired Friday after he applied for a marriage license in New Jersey with his partner, NBC Philadelphia reported.

Michael Griffin, a teacher at Holy Ghost Preparatory School in Bensalem, Pa., was told by the school that his decision “contradicts the terms of his teaching contract.” He first posted about his termination on Facebook Friday morning.

The school’s headmaster, Fr. James McCloskey, confirmed Griffin’s termination in a statement obtained by NBC10:

“Unfortunately, this decision contradicts the terms of his teaching contract at our school, which requires all faculty and staff to follow the teachings of the Church as a condition of their employment. In discussion with Mr. Griffin, he acknowledged that he was aware of this provision, yet he said that he intended to go ahead with the ceremony. Regretfully, we informed Mr. Griffin that we have no choice but to terminate his contract effective immediately.”

Griffin told NBC he has been with his partner throughout the entirety of his 12-year teaching career at the school, and that his partner has been to numerous school functions, even McCloskey’s house.

“I feel hurt, saddened, betrayed and except for this post, am at a loss for words,” Griffin said in a post on his Facebook page Friday. In a separate post on Saturday, he thanked everyone for their “messages of love and support.”