SACRAMENTO, Calif. - The conflict between religious freedom and gay rights has a new battleground - California's religious colleges and universities.

A bill moving through the Legislature would remove a longstanding exemption from anti-discrimination laws for religious institutions, potentially exposing the schools to civil rights lawsuits from students and employees.

Some schools call the measure, SB1146, an attack on their free exercise of religion and say the exemption allows them to craft campus policies in line with their faith.

Get Breaking News Delivered to Your Inbox

Currently, religious institutions can assign housing based on sex, not gender identity, and discipline students for violating moral codes of conduct, which can include anti-transgender or strict sexuality provisions.

The bill tries to force schools to "change 2,000-year-old teachings to be in line with LGBT ideology," said Derry Connolly, president of John Paul the Great Catholic University in Escondido.

"It's no longer 'live and let live.' It's 'If you don't toe the line with us, we'll take you to court big time,'" he said.

The law faces an upcoming test in the state Assembly after passing the Senate.

Bill supporters say it would be the first law of its kind in the nation and would create a safe space for LGBT students.

Its author, Sen. Ricardo Lara, D-Bell Gardens, argues that students who attend religious colleges or universities should have the same rights and protections as students who attend other schools.

"Opponents of LGBT equality have been using the pretext of exercise of religion to justify discrimination," said Rick Zbur, executive director of the advocacy group Equality California.

Under the proposed state law, schools would also have to disclose if they have been granted exemptions from federal Title IX rules against discrimination to prospective and current students, faculty and staff members.

Some religious school officials worry the measure would mean they wouldn't be able to sign an agreement with the state necessary to accept Cal Grant funding given by the state to low-income students. School officials say, in order to sign, they need the exemption to laws prohibiting discrimination.

"They're putting a gun to our head: 'Either change the way you believe and practice your faith, or you won't be able to participate in Cal Grant,'" said John Jackson, president of William Jessup University, which has campuses in Rocklin and San Jose. "We want a license to be faithful and don't want the state to have a license to discriminate."

Patti Colston, a spokeswoman for the California Student Aid Commission, said nothing in the bill would explicitly prevent a religious institution from voluntarily participating in Cal Grant. It would, however, create a path to legal recourse for allegations of discrimination.

Anthony Villarreal, 25, a former track and cross country athlete at William Jessup, is among those who say they would have benefited if the law were in place. He says the university dismissed him in 2013 after learning that he lived with his boyfriend.

The university maintains Villarreal violated a policy prohibiting violent behavior after being arrested and charged with domestic violence. Villarreal acknowledges he was arrested after a domestic violence call involving the home he shared with his boyfriend, but he says charges were never filed.

Villarreal now works three jobs to pay off student loans for an education he has yet to finish. It's too late for him to sue, but he supports the legislation.

"It isn't out to attack Christian universities or wipe them off the face of the planet," he said. "They shouldn't have the legal right or entitlement to discriminate against anyone."

Not all religious schools publicly oppose the bill or have been granted federal exemptions.

Of the estimated 32 faith-based higher education institutions in California, at least seven since 2009 requested exemptions from Title IX, according to the U.S. Department of Education website.

A wave of requests nationwide came after the Obama administration applied Title IX protections to gender identity starting in 2013. Earlier this year, the administration sent a directive on the anti-discrimination policy's applications to transgender students and 11 states sued in response.

Erin Andrews, 35, a senior at Biola University who identifies as a gay Christian, organized a protest this year against her school's request for a Title IX exemption. She believes Biola is violating its own Christian principles by not being open and accepting, and she calls the bill a stepping stone for the LGBT community.

"We're at a Christian university, we're all sinners," said Andrews, who is president of the group Biolans' Equal Ground. "If you're going to protect a certain group of sinners, you need to protect us all."