PHILADELPHIA — Administrators at a Roman Catholic high school suffered a sharp and swift backlash this week after firing a well-liked teacher who sought to marry his same-sex partner.

Educators said they had no choice, but thousands have protested the move through Facebook groups and petitions demanding that Michael Griffin be rehired at Holy Ghost Preparatory School. Some alumni have pledged to withhold financial support.

Caught in the middle are people who say Griffin should have known he was jeopardizing his job, as well as those who worry the negative publicity is unfairly labeling the Bensalem school as intolerant.

“It is a shame that the students and faculty are being painted a certain way, because it is apparent with the amount of support Mr. Griffin has received, this is not the popular mentality,” said 2012 alum Rob Blackwell.

The case started last week when Griffin informed the principal, via email, that he would be late to a meeting because he was getting a marriage license. Griffin and his partner live in Mount Laurel, N.J., where gay marriage is legal.

Same-sex unions are not sanctioned under church teachings, which Griffin was required to uphold as a condition of his employment. School officials say they respected Griffin’s private life until his email forced the issue.

“All of us, including Mr. Griffin, understood that his decision would place him in violation of his contract,” the school said in a statement.

Griffin, a 35-year-old Holy Ghost alum, counters that he didn’t hide his relationship with his longtime partner, whom he joined in a civil union in 2008. Griffin told The Philadelphia Inquirer that his partner even attended school functions.

“We both wear rings, and we were together,” Griffin said. “The alums and donors, they could all see that.”

Rita Schwartz, president of a Catholic teachers union, described the environment at church schools as “don’t ask, don’t tell.” Schwartz said she’s seen straight Catholic teachers lose their jobs for remarrying without getting their previous marriage annulled.