Lawmakers in California on Wednesday approved a bill that creates a “bill of rights” for LGBT seniors in long-term care.

The bill, Senate Bill 219, was authored by Senator Scott Wiener, a Democrat from San Francisco, and sponsored by Equality California, the state's largest LGBT rights advocate. It helps protect seniors from discrimination or mistreatment in long-term care facilities.

“These LGBT seniors are the pioneers who fought for and won the rights and freedoms so many of us enjoy today,” said Wiener in a statement released by Equality California. “Supporting these heroes is a moral imperative, especially as they face discrimination, invisibility, unique health challenges, and frequent lack of family support. The LGBT Seniors Bill of Rights will help our elders age with the dignity and respect they have earned a hundred times over.”

According to a 2011 study conducted by the National Senior Citizens Law Center, 43 percent of LGBT seniors have either been abused by caretakers themselves or witnessed that abuse. Examples given include being turned away or evicted from a long-term care facility based on sexual orientation or gender identity, being forced to share a room with a homophobic or transphobic roommate, and separating same-sex couples.

Opponents of the bill said that it would force Christians and religious organizations to violate their faith.

“No religious non-profit should face criminal prosecution for designating their bathrooms by biological gender,” Jonathan Keller, president of the California Family Council, said in a statement posted on the group's website. “Nor should anyone be forced to use a pronoun for someone that violates that person's strongly held religious belief that gender is not a preference, but a biological, medically observable, objective fact.”

Rick Zbur, executive director of Equality California, said that the bill was needed to “help ensure that care facilities provide culturally-competent care.”

“After struggling to come out at a time when same-sex conduct was still criminalized and fighting the first and most difficult battles for LGBTQ civil rights, discrimination in long term care is forcing many LGBTQ seniors back into the closet,” said Zbur. “SB 219 would help protect LGBTQ seniors when they’re at their most vulnerable, and help ensure that care facilities provide culturally-competent care.”

California Governor Jerry Brown, a Democrat, has not publicly announced his position on the bill.