Republican Governor Pat McCrory of North Carolina makes remarks during a "Growth and Jobs in America" discussion at the National Governors Association Winter Meeting in Washington, February 23, 2014. REUTERS/Mike Theiler

(Reuters) - Hundreds gathered in front of the North Carolina governor’s mansion on Thursday to protest passage of a state law that blocks cities from allowing transgender people to use public bathrooms that match their gender identities.

The demonstrators, carrying signs and chanting phrases like “Trans lives matter,” blocked traffic in front of Republican Governor Pat McCrory’s residence in Raleigh, according to images shared on Twitter by reporters, gay rights groups and protesters.

Videos posted on Twitter showed several protesters being arrested. A police dispatcher confirmed that a protest was under way, but could not provide details on arrests or injuries.

Lesbian, gay, bisexual and transgender advocacy groups condemned the law’s passage and said they were exploring legal challenges.

The National Basketball Association on Thursday called the law discriminatory, adding it did “not yet know what impact it will have on our ability to successfully host the 2017 All-Star Game in Charlotte.”

The legislation came in response to a provision approved last month in Charlotte, the state’s largest city, as part of an expanded non-discrimination ordinance that also added protections for marital and familial status, sexual orientation, gender expression and gender identity.

The state measure passed both chambers of the legislature during a one-day special session convened to address the issue. Republican lawmakers warned that Charlotte’s “radical” action would create a public safety issue by giving men, including sex offenders, access to women’s bathrooms if allowed to take effect on April 1.

McCrory, a former Charlotte mayor, signed the bill late on Wednesday. He said the city’s measure “defies common sense.”

Opponents of the state law said no public safety risks had arisen in the more than 200 U.S. cities that have enacted protections similar to those passed in Charlotte.