BOSTON (CBS) —  Massachusetts governor Charlie Baker signed a bill that would bar discrimination against transgender people in public accommodations, in what is considered the final step before becoming law.

The controversial legislation allows transgender people to use bathrooms and locker rooms that correspond with their identifying gender.

READ MORE: CDC Director Overrules Panel, Approves Pfizer COVID Booster Shots For Frontline Workers

Baker tweeted a statement after signing the bill Friday afternoon.

Opponents of the bill have said it could allow for  sexual predators to make false claims to gain access to women’s restrooms or locker rooms.

State politicians expressed their support for the bill’s enactment.

“The cloud of discrimination that our transgender family members, friends and neighbors have lived under in Massachusetts was lifted today,” Congressman Joe Kennedy III said in a public statement.

MORE NEWS: Coronavirus In Massachusetts: Today's Developments

The Massachusetts Commission Against Discrimination and attorney general’s office have until Sept. 1 to report their recommendations, regulations or guidance. The law takes effect on October 1.