BATON ROUGE, La. (AP) — A judge has thrown out an executive order issued by Louisiana's governor that was aimed at protecting the rights of LGBT people in state government.

Judge Todd Hernandez ruled Wednesday that Democratic Gov. John Bel Edwards' anti-discrimination order is unconstitutional. 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.

Edwards said his order, with an exception for contractors that are religious organizations, is a statement that Louisiana doesn't discriminate. Landry said it tries to establish a new protected class of people that doesn't exist in law and that lawmakers refused to add.

Landry has blocked dozens of legal services contracts that contain the anti-discrimination language.

"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. We respect the trial court’s decision and will abide by it while we vigorously pursue an appeal.” -- Gov. John Bel Edwards

“I applaud Judge Hernandez for basing his ruling on the law, not politics,” said General Landry. “My challenge has always been about upholding the checks and balances on executive authority as established in our State Constitution.” -- Attorney General Jeff Landry.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.