TOPEKA, Kan. — Kansas legislation that would add sexual orientation and gender identity to the state’s anti-discrimination statute is drawing opposition, with critics worried the measure could lead to more lawsuits.

The measure, which was the subject of a legislative hearing Thursday, would make it illegal to fire or evict someone for being gay or transgender, and ensure equal access to public accommodation, the Wichita Eagle reported.

Supporters of the bill consider it necessary because the lesbian, gay, bisexual and transgender community in Kansas routinely faces discrimination. Opponents say the measure would make Kansas residents who oppose same-sex marriage on religious grounds vulnerable to lawsuits and that transgender women would be allowed to enter women’s bathrooms.

Current law shields Kansas residents from discrimination in housing, employment and public accommodations based on race, religion, color, sex, disability, family status, national origin or ancestry.

The new legislation specifically states that public accommodation shall not refer to religious organizations, the measure’s sponsor, Democratic Rep. John Carmichael of Wichita, said after Thursday’s hearing.

Sandra Meade, a Navy veteran and transgender woman who heads the LGBT rights group Equality Kansas, warned during the hearing that opponents would use fear of predators in bathrooms to kill the bill and asked them to “reject that demagoguery on its face.”