Louisiana Gov. John Bel Edwards speaks during a press conference on Aug. 19, 2016, in Baton Rouge, Louisiana.

BATON ROUGE, La. — An executive order issued by Louisiana’s governor that was aimed at protecting the rights of LGBT people in state government was thrown out Wednesday by a judge who said the governor exceeded his authority.

State District Judge Todd Hernandez ruled that Democratic Gov. John Bel Edwards’ anti-discrimination order is unconstitutional because it seeks to create or expand state law. The order prohibited discrimination in government and state contracts based on sexual orientation and gender identity.

The decision delivered a significant victory to Republican Attorney General Jeff Landry, who filed the lawsuit challenging the LGBT-rights order. Landry praised the ruling and said his challenge was aimed at “upholding the checks and balances on executive authority as established in our state constitution.”

Edwards said he plans to appeal. He said his order, which contains an exception for contractors that are religious organizations, is a statement that Louisiana doesn’t discriminate.

“With great respect for the role of the Louisiana Legislature, we continue to believe that discrimination is not a Louisiana value and that we are best served as a state when employment decisions are based solely on an individual’s qualifications and job performance,” the governor said in a statement.

A history of gay rights in America
A history of gay rights in America

Landry said the…