Gay teachers in Ireland no longer have to skirt questions about relationships or ignore homophobic comments thanks to a new law that protects educators from discrimination based on sexual orientation and gender identity.

The bill, approved by parliament late Wednesday night, bans religious schools and hospitals from discriminating against LGBT employees, Gay Star News reports. It amends Ireland’s Employment Equality Act and will now head to the president’s desk to be signed into law. It also includes protections for divorced workers and single parents.

“This bill is the key piece of the legislative map that will allow LGBT people to be themselves, get married, and have a family without a threat to their job if they work in a religious-run institution,” said Sandra Irwin-Gowran, director of education policy with the Gay and Lesbian Equality Network, in a statement following the bill’s passage.

Previously, employers could dismiss LGBT workers if their sexual orientation undermined “the religious ethos of the institution.” Ireland is a predominantly Catholic nation; roughly 90 percent of schools have religious affiliations, as do many of the major hospitals.

Although same-sex marriage was legalized by a landslide popular vote in May, LGBT teachers in Ireland have cataloged negative experiences working in Catholic schools, ranging from administrative warnings to keep relationships private to denied promotions to living in secret. Although the clause never led to a teacher’s dismissal, it struck fear in educators, according to The Journal.ie.

The same cannot be said for educators in the U.S. Teachers at Catholic schools in Pennsylvania, Nebraska, Washington, and California—the list goes on—have been fired or denied positions because of their sexual orientation. Employment discrimination laws vary across the nation, but religious exemptions allow administrations to fire a teacher because of sexual orientation or gender identity. The Roman Catholic Church opposes same-sex marriage and expects teachers to be role models for the students and live by the church’s teachings. Yet many of the firings have been met with protests by students who feel church doctrine also espouses love and acceptance.

Advocates in Ireland believe the nondiscrimination law will extend love and acceptance not only to LGBT teachers but to the rest of community.

“This bill has wider implications for our schools and in particular for LGBT young people,” said Irwin-Gowran. “It provides a critical springboard for the cultural change necessary in our schools; change that ensures that all people, whether they’re working or learning, can do so in an environment that is welcoming and affirming of who they are.”