RALEIGH, N.C. (AP) — North Carolina’s attorney general said Tuesday he won’t defend in court a new state law preventing Charlotte and other local governments from approving protections for LGBT people, calling it discriminatory and a “national embarrassment.”

Democrat Roy Cooper made the announcement during a news conference a day after gay rights advocates sued to overturn the law approved last week and signed by Republican Gov. Pat McCrory.

The federal lawsuit lists Cooper among the defendants because of his official position as the state’s top lawyer, but he has said he wants it repealed.

“Not only is this new law a national embarrassment, it will set North Carolina’s economy back if we don’t’ repeal it,” Cooper said. “We know that businesses here and all over the country have taken a strong stance in opposition to this law.”

North Carolina Attorney General Roy Cooper. (AP Photo/Jim R. Bounds)

North Carolina Attorney General Roy Cooper. (AP Photo/Jim R. Bounds)

McCrory is also a defendant in the lawsuit and has doubled down on justifying his decision to sign the law, even as many corporations have criticized it publicly. Cooper said the law will cost the state jobs and millions of dollars.

Cooper’s announcement raises the stakes for the November governor’s race, in which Cooper is challenging McCrory. National Democrats consider it their best opportunity to pick up a governor’s mansion where a Republican currently resides. The campaigns of McCrory and Cooper already have raised more than $13 million combined and the Republican Governors Association has reserved $4 million in ad time for the fall.

The Republican-led legislature and McCrory approved the law because they say Charlotte went too far with a local ordinance allowing transgender people to use the restroom aligned with their gender identity. They have focused on the threat – used by opponents of Houston’s LGBT ordinance last year while defeating it in a referendum – that sexual predators could use these kinds of rules as a pretense to enter women’s bathrooms and locker rooms. Gay rights groups have called these and other arguments bogus.

Cooper’s decision continues a yearslong tussle between him and Republican leaders in state government, who say they don’t trust the attorney general to robustly defend state laws challenged in court.

Cooper, the attorney general since 2001, has expressed his personal opposition to a law that placed new restrictions on voting, including a photo identification mandate to vote in person. But he has said it was his duty for the state to be represented in a professional manner in pending litigation challenging the voting changes. Legislative leaders and McCrory, however, have hired outside counsel to sit beside the state attorney in this and other cases.

House Speaker Tim Moore and Senate leader Phil Berger said Monday they couldn’t respond to whether they would hire outside lawyers in the transgender lawsuit until they found out Cooper’s plans.