Updated

Hundreds of people descended on a California Catholic school on Thursday to protest the recent firing of a teacher who lost his job after news of his marriage surfaced days after the U.S. Supreme Court cleared the way for gay nuptials to resume in The Golden State.

The firing has stoked an outpouring of support for veteran teacher Ken Bencomo and Christopher Persky, who were among the first gay couples to line up at the San Bernardino County Assessor-Recorder's Office to get married after the Supreme Court's decision. On Thursday, former students at St. Lucy’s Priory High School, where Bencomo had taught for 17 years, rallied behind the educator.

"Everyone loves Mr. B, so it's just heartbreaking that he would get fired for marrying the person he loves,” said senior Malia McDowell.

Another student said: “Everybody knew he was gay, the faculty knew he was gay and it was never a problem.”

St. Lucy's Priory High School, located about 20 miles northeast of Los Angeles, has said the school provides an education based on Catholic tradition.

"While the school does not discriminate against teachers or other school employees based on their private lifestyle choices, public displays of behavior that are directly contrary to church teachings are inconsistent with these values," St. Lucy's said in a statement.

Under federal law, church-based schools can make hiring decisions for religious reasons, said David Ball, co-chair of the American Bar Association's religious organizations subcommittee. But courts are still grappling with which kinds of instances are covered by this exemption to anti-discrimination laws.

"This is his private life, out of work so that's the gray area," Ball said. "When can religious employers say they have religious reasons for firing somebody when it's got nothing to do with their job performance? (when) it's their identity, not their actions?"

Bencomo, who in the past attended school fundraisers and events with his partner, hasn't filed a lawsuit, saying he would rather settle the matter without one. He could not be reached for comment.

"They told him because of the marriage and that it was publicized and it was against church teachings they had to fire him," Bencomo's lawyer, Patrick McGarrigle, said last week.

More than 50,000 people have signed an online petition calling for Bencomo to be reinstated.

The Associated Press contributed to this report.

Click for more from MyFoxLA.com.