A Louisiana district judge on Wednesday threw out the governor’s executive order seeking to protect state employees from discrimination based on their sexual orientation or gender identity.

Democratic Governor John Bel Edwards issued the order in April after taking office in January, the latest action in a 20-year partisan battle over LGBTQ rights in the state, where similar executive orders have been reinstated or revoked depending on the party affiliation of the governor in charge (Republicans have revoked, Democrats have reinstated). This time, the governor faced a legal challenge from Republican Attorney General Jeff Landry, who charged that Edwards had overstepped his authority in pursuit of advancing an “extreme agenda.” It was mostly the trangender-protections language in the order with which Landry took issue.

The ideological showdown between Edwards and Landry mirrors a wider trend seen at different levels of government across the country, with many conservative lawmakers rejecting efforts to pass laws protecting the rights of transgender Americans. A nondiscrimination ordinance passed by lawmakers in Charlotte, North Carolina, earlier this year was overridden by state legislators who in turn passed the controversial “bathroom bill” mandating transgender residents use the bathroom in accordance with their biological sex rather than their gender identity. This invited a lawsuit from the federal government, and a countersuit from Gov. Pat McCrory.

State District Judge Todd Hernandez sided with Landry in the Louisiana fight and struck down the order, ruling that a Louisiana governor cannot create laws with executive orders. Landry delivered searing criticism to the governor in response: “We do not live under a King in Louisiana,” Landry wrote. “Gov. Edwards must live within the Constitution.”

“I applaud Judge Hernandez for basing his ruling on the law, not politics,” added Landry.

Landry’s lawyer, Elizabeth Murrill, said that while the attorney general supported throwing the order out entirely, he would have been willing to compromise if the language about protecting gender identity were removed, according to a report earlier this month.

Edwards vowed to “vigorously pursue an appeal.”

“We continue to believe that discrimination is not a Louisiana value,” he wrote in a statement. “We are best served as a state when employment decisions are based solely on an individual’s qualifications and job performance.”

The cities of Baton Rouge, New Orleans, and Shreveport and the parish of Jefferson have local laws prohibiting discrimination on the basis of sexual orientation and gender identity.

In 1998, New Orleans became one of the first cities in the United States to pass a local law protecting people from discrimination on the basis of sexual orientation. Eight years later, it updated its law with a provision to specifically protect people from discrimination based on their gender identity. Baton Rouge, Shreveport, and the parish of Jefferson also prohibit discrimination on the basis of sexual orientation and gender identity. But similar efforts at the state level have been elusive.