Massachusetts may have found a compromise for the transgender bathroom debate, which has states across the country railing against federal guidance advising that transgender people use the bathroom or locker room associated with their gender identity.

Republican Gov. Charlie Baker voiced his approval for a new bill currently in the state’s House of Representative, after months of declining to say whether he would support transgender rights legislation in line with the federal standard.

The new Massachusetts measure would allow transgender people to use the bathroom in line with the gender they associate with rather than their birth gender, but would include a provision addressing those who would claim a different gender identity “for an improper purpose.”

The House version of the bill further bans transgender discrimination in “Any public accommodation,” granting any person “admission to and the full enjoyment of” such places “consistent with the person’s gender identity.” A different version of the bill, which does not include the "improper purpose" stipulation, previously passed through the Senate.

The House version of the bill seeks to address the concerns of both transgender and safety activists, the former who claim that access to public places is a right for all people regardless of gender identity, and the latter who are worried such bills could open the door to sexual predators claiming to be transgender in order to more easily prey on members of the opposite gender in places like bathrooms or locker rooms.

Governor Baker has said that he would sign the House version of the bill containing the additional guidance for law enforcement regarding the safety provision.

“We’ve certainly listened to a variety of points of view from many sides and have said, from the beginning, that we don’t want people to be discriminated against,” Baker told The Boston Globe. “If the House bill were to pass in its current form, yeah, I would sign it.”

That version, he said “supplies the right amount of clarity with respect to the public safety questions that other people have raised.” It would require the Massachusetts Commission Against Discrimination to enact regulations protecting trangsender people from discrimination, while the state’s Attorney general would have to issue guidance regarding consequences for those who would misuse the legislation.

Baker, a socially liberal Republican, was criticized for not picking a side in the debate until Tuesday, despite previously voicing his opposition to discrimination. In April, Baker was booed at an LGBT event for his refusal to back the bill.

Boston Mayor Marty Walsh, a Democrat, had a transgender pride flag raised in front of Boston City Hall earlier this month which he said would fly until the entire state enacted transgender accommodation laws similar to those Boston has had since 2002.

“We've proven there's nothing to fear from being inclusive,” Mayor Walsh said, according to the Associated Press. “Quite the opposite. We are safer, we are stronger when everyone enjoys the same protections.”

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

The new bill is expected to pass through the majority Democrat House Wednesday, after which Baker could make Massachusetts the 18th state to enact transgender discrimination protections.

Material from Reuters was used in this report.