A Massachusetts court has ruled against a Catholic high school that rescinded a job offer to a married gay man.

Superior Court Associate Justice Douglas H. Wilkins ruled Wednesday that Fontbonne Academy, a Catholic girls high school, had discriminated against Matthew Barrett on the basis of sexual orientation and sex when it rescinded a job offer after learning that he is married to another man.

Barrett, a longtime food industry professional, was offered the position of food services director at Fontbonne Academy on July 9, 2013. He filed employment paperwork that listed his husband, Ed Suplee, as his emergency contact. The following day, he was told that the school would no longer employ him because of his marriage.

Lawyers for Fontbonne argued that Barrett was welcome at the school provided that he was not married to another man.

“Fontbonne tries to justify its decision on the ground that hiring Barrett, while he was in a same-sex marriage, would be inconsistent with both the teachings of the Catholic Church and its own policy that all employees are models for the students,” Wilkins wrote in his decision.

“It is no answer to say that Fontbonne denied Barrett employment because he was in a same-sex marriage, not because of his sexual orientation. The law recognizes no such distinction. 'A tax on wearing yarmulkes is a tax on Jews.' … Likewise, discrimination on the basis on one's opposition to same-sex marriage is discrimination on the basis of sexual orientation.”

Barrett is represented by GLAD, which called the ruling a “first-of-its-kind decision.”

“Religiously-affiliated organizations do not get a free pass to discriminate against gay and lesbian people,” GLAD Senior Attorney Bennett Klein said. “When Fontbonne fired Matt from a job that has nothing to do with religion, and simply because he is married, they came down on the wrong side of the law.

A hearing to determine damages is the next step in the case.