The N.B.A. announced Thursday that it would not hold next season’s All-Star Game in Charlotte, N.C., among the most prominent consequences from state legislation that eliminated specific antidiscrimination protections for lesbians, gays and bisexuals.
The legislation, passed in March, also mandated that transgender people use public bathrooms that match their birth gender.
The law created an immediate backlash and raised speculation that the N.B.A., the North American professional league now most identified with engagement on social issues, would conclude that it had no choice but to move the game.
In a statement accompanying the announcement, the league said it hoped to hold the 2019 All-Star Game in Charlotte — with the clear implication that changes to the legislation would have to be made — and that a new site for the 2017 game would be announced in the next several weeks. The game had been scheduled for Feb. 19 at Time Warner Cable Arena.
Gov. Pat McCrory of North Carolina issued a blistering statement soon after the announcement by the N.B.A. He said “the sports and entertainment elite,” among others, had “misrepresented our laws and maligned the people of North Carolina simply because most people believe boys and girls should be able to use school bathrooms, locker rooms and showers without the opposite sex present.”
Mr. McCrory, a Republican, did not specifically refer to the N.B.A. in his statement, but he said that “American families should be on notice that the selective corporate elite are imposing their political will on communities in which they do business, thus bypassing the democratic and legal process.”
Several musicians — including Bruce Springsteen, Ringo Starr and Itzhak Perlman — have canceled concerts in North Carolina to protest the law, and there have been calls for repeal by a number of businesses, some of which have canceled plans to create new jobs in the state.
In the statement, the league said that both it and the Hornets, the N.B.A. team based in Charlotte, had been “working diligently’’ since the legislation was passed in March to foster “constructive dialogue” about the legislation and to “try to effect positive change.”
But the legislation remains intact for now, and the N.B.A, acutely aware of the long lead time needed to stage an All-Star Game, opted to pull out of Charlotte.
“While we recognize that the N.B.A. cannot choose the law in every city, state and country in which we do business, we do not believe we can successfully host our All-Star festivities in Charlotte in the climate created” by the current law, the statement said.
N.B.A. players have generally been more publicly vocal about social justice issues in recent years. A number of the league’s top players have spoken out in recent weeks in reaction to shootings around the country that have left police officers dead in two cities and police officers accused of deadly recklessness in other cases.
In December, the N.B.A. participated in a series of television advertisements denouncing gun violence during its long Christmas Day schedule of games.
The decision by the N.B.A. is certain to inject new fervor into the debate about North Carolina’s law, which many people still refer to as House Bill 2.
Before its adjournment this month, and in defiance of pleas from public officials and corporate executives in Charlotte, the General Assembly resisted demands that it back away from some of the most contentious elements of the law, which supporters have argued is about public safety, not discrimination.
The fate of the law, which the United States Department of Justice has challenged as a violation of the Civil Rights Act of 1964, is likely to be settled in court. A federal judge in Winston-Salem, N.C., will hear arguments next month on whether to block the law while the litigation is pending.
Republicans had signaled repeatedly that the N.B.A.’s misgivings were unlikely to persuade the law’s supporters.
“Our values are not shaped by the N.B.A. or Bruce Springsteen or some opinion poll,” state Representative Phil Shepard, a Republican and a Baptist minister, declared at a rally in April. “We’re standing strong.”