The National Basketball Association is pulling the 2017 All-Star Game from Charlotte over North Carolina’s House Bill 2.

The Vertical was first to report the news Thursday afternoon.

The NBA confirmed the reports in a statement released Thursday evening.

The NBA has been threatening to move the All-Star festivities for months. HB2 was passed in a special session of the North Carolina General Assembly in late March of this year. The law requires transgender individuals to use the bathroom and changing facility that corresponds with their birth certificate rather than their gender identity. The special session was called in late March after Charlotte voted to extend the city’s nondiscrimination policy to members of the LGBT community.

HB2 also barred localities across the state from passing nondiscrimination policies that extend beyond the state policy. The bill also prohibited residents from suing in state court over discrimination. That provision was changed during the General Assembly’s short legislative session but no other changes were made to the legislation.

The NBA statement read in part:

“Our week-long schedule of All-Star events and activities is intended to be a global celebration of basketball, our league, and the values for which we stand, and to bring together all members of the NBA community — current and former players, league and team officials, business partners, and fans. 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 Hornets also issued a statement following the decision by the NBA, saying in part:

“We understand the NBA’s decision and the challenges around holding the NBA All-Star Game in Charlotte this season. There was an exhaustive effort from all parties to keep the event in Charlotte, and we are disappointed we were unable to do so.”

Governor Pat McCrory issued a statement following the NBA’s decision to pull the All-Star Game.

“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.”

McCrory went on to say, “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.”

A coalition of groups including the American Civil Liberties Union, the ACLU of North Carolina and Lambda Legal filed a motion for a preliminary injunction stopping the implementation of HB2 in federal court. That motion will be heard in federal court on August 1. The United States Department of Justice is also locked in a legal battle with the state of North Carolina over the legislation. The lawsuits argue HB2 violates Title IX of the Education Amendments, Title VII of the Civil Rights Act and the Violence Against Women Act.

North Carolina is also one of nearly two dozen states suing after President Barack Obama issued a directive earlier this year to allow transgender students to use the bathroom matching their gender identity.

The NBA did leave open the option of returning the All-Star weekend to Charlotte in 2019. The NCAA Tournament is set to host early-round tournament games in North Carolina over the next two years, but those could be in jeopardy of moving as well due to HB2.