A Boston man who had a job offer from an all-girls Catholic high school rescinded after administrators learned that he was in a same-sex marriage has settled a lawsuit with the school.

The Boston Globe reports 45-year-old Matthew Barrett's confidential settlement with Fontbonne Academy comes nearly five months after a Massachusetts judge found the Milton school had discriminated against Barrett.

Fontbonne Academy officials pulled their offer of a food service position to Barrett in 2013 after he listed his husband as an emergency contact.

Ben Klein, Barrett's attorney, says the settlement means that the December Superior Court ruling against the school will stand, establishing a legal precedent that employers have no religious justification for discriminating on the basis of sexual orientation.

Fontbonne released a statement saying it "expresses deep gratitude to Mr. Barrett for his willingness to come together with us in a spirit of conciliation."