(AP) — San Francisco Mayor Ed Lee has banned city workers from non-essential travel to North Carolina after that state approved legislation preventing anti-discrimination protections for gay, lesbian and transgender people.

Lee said in a statement Friday that residents in the city with a large gay and lesbian population “will not subsidize legally sanctioned discrimination.” He says the new law turns back the clock on civil rights protections.

North Carolina Gov. Pat McGrory signed legislation this week voiding a Charlotte ordinance that would have allowed transgender people to legally use restrooms aligned with their gender identity. The ordinance also would have provided wide protections against discrimination in public accommodations.

The law prevents cities and counties from passing anti-discrimination rules and imposes a statewide standard that leaves out protections based on sexual orientation and gender identity.