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: Tatum, Brown shoulder blame for Celtics' third quarter collapse in Game 1

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.

READ MORE: Dreadful third quarter dooms Celtics as Butler leads Heat to 118-107 victory in Game 1

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: Natick elementary school custodian saves student choking in cafeteria

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.