RALEIGH, N.C. (AP) — North Carolina's Republican legislative leaders want a judge to throw out a lawsuit that focuses on the latest version of the state's "bathroom bill." But dismissing it their way would also dissolve a proposed deal pushed by the Democratic governor to let transgender people use many public restrooms that correspond to their gender identity.

Gov. Roy Cooper and the plaintiffs in the lawsuit — LGBT citizens and civil rights groups — asked U.S. District Judge Thomas Schroeder last week to approve a settlement that would end the litigation. But the agreement also would make it clear that transgender people can use restrooms aligned with the gender they identify with in state government buildings that Cooper controls.

But House Speaker Tim Moore and Senate leader Phil Berger, who worked out a compromise with Cooper last spring on House Bill 2 and are defendants like Cooper, oppose the consent decree and wrote Monday they intend to file a motion to that effect.

Meanwhile, they told Schroeder on Monday in a brief that the lawsuit against the replacement law known as HB142 should be thrown out because the plaintiffs haven't shown they've been injured by the new law.

HB2, approved in March 2016, required transgender people to use restrooms in many public buildings corresponding to the sex on their birth certificates. The replacement law did away with that mandate but stated the General Assembly — not local governments or school officials — were permitted to make rules for public restrooms. It also prohibits local governments from enacting new nondiscrimination ordinances for workplaces, hotels and restaurants until December 2020.

LGBT activists, who had already sued over HB2, amended their lawsuit and said the new law leaves it unclear which bathrooms transgender people will be able to use in government buildings and universities and whether using the wrong one could lead to criminal charges.

The "plaintiffs' claimed injuries are speculative," lawyers Robert Potter Jr. and Kyle Duncan wrote on behalf of the GOP leaders to Schroeder. "It is unclear whether any plaintiff will ever be injured in any way arising from using the facilities in question."

Forcing officials to ensure public restrooms can be used by transgender people in line with their gender identity and to allow local governments to keep passing non-discrimination ordinances would wrongly ignore state law, the lawyers argued.

"Ultimately, the proposed consent decree appears to reflect a collusive effort to obtain by court decree what plaintiffs have been unable to obtain by litigation and the (Cooper administration) could not obtain legislatively," they wrote last Friday in a separate brief.

Cooper made HB2's repeal a key element in his winning gubernatorial campaign last year against Republican Gov. Pat McCrory, who signed HB2. Groups supporting the rights of lesbian, gay, bisexual and transgender people celebrated Cooper's victory but within months scolded Cooper for agreeing to HB142 because it wasn't a full repeal.

Cooper said last week the proposed decree and a separate executive order he issued expanding LGBT rights in state government and to government vendors were good steps forward fighting discrimination and promoting equality statewide. But legislative leaders said Cooper was re-opening a fight over social issues that had been settled for the immediate future through HB142.