Andy Lyons via Getty Images Adam Silver talks to the media before the start of the Oklahoma City Thunder game against the Memphis Grizzlies in Game 4 of the Western Conference Quarterfinals during the 2014 NBA Playoffs.

It’s happened: The NBA has pulled the 2017 All-Star Game out of Charlotte in protest of North Carolina’s House Bill 2 (HB2), otherwise known as the “bathroom bill,” the league announced on Thursday.

“While we recognize that the NBA 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 HB2,” the league said in a statement.

The controversial law, which was passed in March, forces transgender people to use the bathroom that corresponds with the gender they were assigned at birth, rather than the gender they now identify as, and bars local governments from protecting the LGBT community through nondiscrimination policies.

NBA Commissioner Adam Silver had previously warned in April that the league would pull the All-Star Game out of Charlotte should HB2 not be altered, but had not set a deadline for the state to do so. The NBA and Charlotte Hornets were reportedly working with lawmakers to alter the bill to the league’s satisfaction in the weeks leading up to the decision.

The league has not finalized where it will host the All-Star weekend instead, but said it will make a decision “in the coming weeks.” The Vertical reports that the league is zeroing in on New Orleans as a potential alternative.

Gov. Pat McCrory (R), a staunch defender of the law, rebuked the NBA and “left-wing special interest groups” who have criticized the law.

“The sports and entertainment elite, Attorney General Roy Cooper and the liberal media have for months 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,” a statement read.

“Twenty-one other states have joined North Carolina to challenge the federal overreach by the Obama administration mandating their bathroom policies in all businesses and schools instead of allowing accommodations for unique circumstances. Left-wing special interest groups have no moral authority to try and intimidate the large majority of American parents who agree in common-sense bathroom and shower privacy for our children. 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.”

In a joint statement, the Human Rights Campaign, the largest LGBTQ civil rights organization in the country, and Equality NC, a North-Carolina-based LGBTQ advocacy organization, praised the NBA for taking a stand against bigotry.

“Today the NBA and Commissioner Silver sent a clear message that they won’t stand for discrimination against LGBTQ employees, players or fans,” HRC President Chad Griffin said in the statement. “Every day that HB2 remains on the books, people across North Carolina are at risk of real harm. We appreciate the leadership of the NBA in standing up for equality and call once again on lawmakers to repeal this vile HB2 law.”

Perhaps, ironically, canceling the All-Star Game will most adversely punish Charlotte, a city that had tried to protect transgender people before the HB2 was signed into law. The city passed a resolution just one month before to protect the transgender community from discrimination. The anti-LGBT state law made it so the city could not follow through.

In its statement, the league left open the possibility that it award the 2019 All-Star Game to Charlotte, should North Carolina resolve the issue to the league’s satisfaction. The NBA apologized to fans in North Carolina for the decision.

“We are particularly mindful of the impact of this decision on our fans in North Carolina, who are among the most passionate in our league,” the league said. “It is also important to stress that the City of Charlotte and the Hornets organization have sought to provide an inclusive environment and that the Hornets will continue to ensure that all patrons — including members of the LGBT community — feel welcome while attending games and events in their arena.”