North Carolina just passed a combination of some of the most extreme anti-LGBTQ measures in the US.

Following Charlotte's decision to ban discrimination against LGBTQ people in some settings, North Carolina's Republican governor and Republican members of the legislature said they would overturn the local ordinance. On Wednesday, the legislature passed a bill that does just that, and Gov. Pat McCrory signed it into law — all within 24 hours.

The North Carolina law, however, affects more than the city of Charlotte: It not only strikes down Charlotte's ordinance, but also overturns and bans all future local nondiscrimination protections for LGBTQ people across the state. Here's what the state's law does:

The statute overturns and bans local laws that don't conform to the state's nondiscrimination laws for the workplace and public accommodations (hotels, restaurants, and other places that serve the public). Since the state doesn't ban discrimination based on sexual orientation or gender identity in the workplace or public accommodations, this effectively forces all cities and counties to keep it legal to discriminate against LGBTQ people in these settings. It prohibits transgender people from using bathrooms or locker rooms in schools and government agencies based solely on their gender identity. Instead, they're forced to use bathrooms and locker rooms based on the gender noted on their birth certificate, which can be changed through an arduous process after gender-affirming surgery but not before then. Public facilities can still build unisex single-person bathrooms to accommodate trans people, but it's not required.

It's a startling piece of legislation — one that Sarah McBride of the Center for American Progress called "one of the most extreme, anti-LGBT bills we've seen yet."

To learn more, read Vox's explainer.