BOSTON — Massachusetts may turn into the next battleground over transgender rights.

Although legislative leaders support a well-publicized bill that would add anti-discrimination protections to transgender people using public accommodations, a lesser discussed bill also before the joint judiciary committee would take an opposite tack. That bill would limit access to public bathrooms and locker rooms to individuals’ anatomical sex and not their own declared gender identity.

“This a commonsense kind of bill. If you’re anatomically a male you can’t go into the girls bathroom. You have to go into the regular identity bathroom that you belong in,” said Rep. Dennis Rosa, a Leominster Democrat who co-sponsored the bill. “People who signed onto this [bill] strongly believe in that.”

Rosa said he has received hundreds of emails from mostly women concerned about men going into the women’s restroom dressed as females, and worried about children and grandchildren being exposed to male anatomy.

The transgender anti-discrimination bill, Rosa said, is “going to take away the rights of most people in Massachusetts.”

Democratic Rep. Colleen Garry of Dracut, the primary sponsor of the bill Rosa is backing, H 1320, filed it last year after the state’s education commissioner sent a guide to state public schools allowing transgender access to school restrooms and locker rooms.

“The other students have privacy rights as well. To take a minority right and put it above the rights of other students, I think, is wrong,” Garry said.

She added that the bill, which is not limited to schools, is a response to the education commissioner’s refusal to consider separate private changing areas for individuals who identify as transgender.

Garry’s other reason for the bill is to prevent potential pedophiles from molesting children under the protection of calling themselves transgender.

“An adult male could walk into a women’s room. If they get caught, all they have to do is say, ‘I’m transgender,'” Garry said. “I think that a pedophile will use this as cover …”

The debate over transgender rights, particularly in the use of public bathrooms, has been played out around the nation.

Bills similar to Garry’s are pending in Indiana, Illinois, Missouri, Oklahoma and Tennessee.

Last November, Houston voters rejected a law that guaranteed protections based on an individual’s sexual orientation and gender identity after a yearlong campaign that saw opponents label the law “the bathroom bill.”

After the city of Charlotte, N.C., passed a nondiscrimination ordinance extension in February that would allow people who identify as transgender to use public restrooms based on their gender identity, the state legislature passed its own law barring local governments from passing such ordinances.

According to Mick Bullock, a spokesman for the National Conference of State Legislatures, North Carolina is the first state to enact legislation restricting access to sex-segregated facilities.

Some organizations in the commonwealth that have voiced opposition toward the transgender anti-discrimination bill also support Garry’s bill.

Massachusetts Family Institute spokesman Jonathan Alexandre, who testified against the anti-discrimination bill last year before the joint judicial committee, said that separating facilities based on anatomical sex and not gender identity is not a matter of discrimination.

“There’s no rational basis to separate folks in bathrooms based on the color of their skin, but there is a basis to separate folks based on anatomical sex,” Alexandre said. He also said that there is a safety risk associated with two sexes using private facilities at the same time.

But Rep. Jennifer Benson, D-Lunenburg, says this type of legislation does more harm than good.

“I think it’s really important that people use the bathroom or the facility that is in harmony with their gender expression,” Benson said. “If you make it so that transgender individuals are forced to use the facilities of their biological gender, it can create a dangerous situation.”

Benson referenced a statement by the Massachusetts Chiefs of Police Association endorsing the anti-discrimination bill.

In a statement, the association said: “Unfortunately, transgender people are frequently the target of criminal conduct, particularly in public spaces. In the jurisdictions where gender identity discrimination is prohibited in places of public accommodation, we have found that these incidents are reduced as a result of such protections.”

Benson, a co-sponsor of the transgender anti-discrimination bill, said protecting the rights of transgender people is a step in the right direction.

“I would never support anything to roll back protections or to negatively impact subgroups,” she said.

Other high-profile supporters of the anti-discrimination bill include Senate President Stanley Rosenberg, House Speaker Robert DeLeo and Attorney General Maura Healey.

With opposing bills in committee, the judiciary committee has the power to decide what happens next, including an option to redraft the bills, either together or separately.

Rosa, who called his bill (H 1320) “an amendment” to the anti-discrimination bill, said he would be open to compromise, including removing language in the anti-discrimination bill that refers specifically to barring transgender discrimination in sex-segregated facilities such as bathrooms and locker rooms.

“Compromising and creating a new bill would probably be workable,” Rosa said.

However, Democratic Sen. Jamie Eldridge of Acton would not support restricting any part of the anti-discrimination bill, which he co-sponsored.

“This would defeat the purpose,” Eldridge said.

“I believe that all of my constituents, including those who identify as transgender, should not be discriminated against when they shop, eat at a restaurant or apply for a job,” Eldridge added. “I remain hopeful that S735 will pass into law this session.”

According to the Senate clerk’s office, the joint judiciary committee can file for an extension as many times as it would like before the end of the legislative session. Right now, the committee is supposed to make a decision on the bill before May 2.

“We’ll see what happens,” Rosa said. “My personal opinion is it’s all politics now, extending deadlines. It’s an election year, and I can’t imagine [either bill] coming up for a vote.”