North Carolina's attorney general said Tuesday that he won't defend in court a newly enacted state law preventing local governments from passing anti-discrimination rules meant to protect gay, lesbian and transgender people. 

Roy Cooper made the announcement one day after a day after gay rights advocates sued the state to seek to overturn the law. The federal lawsuit lists Cooper among the defendants because of his official position.

Cooper, a Democrat who is challenging Republican Gov. Pat McCrory in the November election, described the law as "a national embarrassment" that conflicted with his own department's anti-discrimination rules and "will set North Carolina's economy back" if it is not repealed.

McCrory complained this week that a well-coordinated national campaign is "distorting the truth," and in a video Tuesday accused Cooper of "inventing conflict that simply doesn't exist" to justify his argument to refuse to defend the law.

North Carolina Senate President Pro Tempore Phil Berger called on Cooper to resign, saying the attorney general's "zeal for pandering for the extreme left’s money and agenda in his race for governor is making it impossible for him to fulfill his duties."

Cooper responded that he has no plans to step down.

The CEOs of dozens of big technology, biotech and financial companies signed a letter released Tuesday by gay rights advocates urging state officials to overturn the law, which the governor signed just hours after it was introduced and approved by Republicans in a special session.

"Discrimination is wrong and we believe it has no place in North Carolina or anywhere in our country. As companies that pride ourselves on being inclusive and welcoming to all, we strongly urge you and the leadership of North Carolina's legislature to repeal this law in the upcoming legislative session," reads the letter, signed by IBM CEO Virginia Rometty, Apple head Tim Cook and Mark Zuckerberg of Facebook, among others.

In addition, Washington Gov. Jay Inslee joined New York Gov. Andrew Cuomo and San Francisco Mayor Ed Lee in banning nearly all official travel to North Carolina.

The North Carolina Values Coalition, for its part, said hundreds of business owners support the state law, but many don't want to be named for fear of retaliation, a spokeswoman said.

The Associated Press contributed to this report.

Click for more from The News & Observer.