Democratic Governor John Bel Edwards' order protecting LGBT workers has been declared unconstitutional by a Louisiana judge.

Judge Todd Hernandez threw out the order on Wednesday, saying that it is “a violation of the Louisiana Constitution's separation of powers doctrine and an unlawful usurp of the constitutional authority vested in the legislative branch of the government,” Reuters reported.

Edwards issued his order in July. It prohibits discrimination on the basis of sexual orientation and gender identity among state agencies and contractors doing business with the state. Religious organizations are exempt.

The state's conservative attorney general, Republican Jeff Laundry, has challenged Edwards' order and applauded the judge's opinion.

(Related: Louisiana AG Jeff Landry can block state contracts that include LGBT protections, judge says.)

Edwards expressed his disappointment in a statement and said that the ruling would be appealed.