WINSTON-SALEM, N.C. (Reuters) - Transgender people still face discrimination and threats to their safety in North Carolina despite lawmakers replacing a measure that restricted their access to many public bathrooms, advocacy groups said in a new federal court action on Friday. The law thrust the state into the center of a national debate over equality, privacy and religious freedom last year by requiring transgender people to use restrooms in state-run buildings that matched the sex on their birth certificate rather than their gender identity. A new measure, passed in March, helped bring back some business and sports events pulled from the state in protest in the year after it enacted the so-called bathroom bill. But the replacement law lacks clarity, with top state leaders in disagreement about what it means for transgender bathroom access, the American Civil Liberties Union and Lambda Legal argue in their amended lawsuit. That leaves transgender people uncertain - even fearful - about which restrooms they can safely use, they said. “When legislation fails to protect us, when it leaves us in limbo, it sends a message that our lives are expendable,” plaintiff Joaquín Carcaño, a transgender man who works at the University of North Carolina at Chapel Hill, told reporters. The amended complaint expands the lawsuit filed last year to challenge HB 2, which the state’s Republican leaders said was needed for public safety. The new law, HB 142, rescinded HB 2 but left many of its harmful effects in place, opponents say. The current law bars state agencies, schools and local governments from regulating government-run restrooms, showers and changing facilities, leaving responsibility for those policies with state lawmakers. It also bans cities in the state from passing their own anti-discrimination protections for lesbian, gay, bisexual and transgender (LGBT) people until 2020. Governor Roy Cooper, a Democrat who signed the new law, is now named as a defendant in the lawsuit, replacing former Republican Governor Pat McCrory, whose defeat in the 2016 election is partly blamed on his support for the old law. Cooper has called the replacement law imperfect but necessary to help repair North Carolina’s damaged reputation.  “The governor’s ultimate goal is statewide LGBT protections, and he is going to continue working toward that,” Cooper spokesman Ford Porter said in a statement on Friday. A battle over bathrooms also flared on Friday in Texas, where lawmakers heard impassioned public testimony about proposals to limit public restroom access to transgender people in that state. 