An appeals court has upheld a lower court's ruling that blocked Arizona from ending health benefits for gay and lesbian state employees, reported.

Last year, U.S. District Judge John Sedwick issued an injunction that prevented the state from implementing a law that would have cut benefits to the domestic partners of gay state employees and the children of those partners.

The legislation approved by lawmakers and signed by Republican Governor Jan Brewer eliminated health benefits to the spouses of domestic partners – gay or straight. The move adversely affects gay couples, who cannot legally marry in Arizona.

Lawyers representing the state argued that the measure was needed to cut a ballooning deficit. Neither Judge Sedwick nor the three-judge panel of the 9th Circuit Court of Appeals found the argument very convincing.

“Of particular significance to the district court was the fact that while the plaintiffs produced expert analysis on the impact of the law on the state's expenditures and found it minimal, the court was not provided any evidence of the actual amount of benefits the state paid for same sex partners,” Judge Mary Schroeder wrote for the appeals court. “Defendants nevertheless contend on appeal that this law is rationally related to the state's interests in cost savings and reducing administrative burdens. As the district court observed, however, the savings depend upon distinguishing between homosexual and heterosexual employees, similarly situated, and such a distinction cannot survive rational basis review.”

The state had also argued on appeal that employees do not have a constitutional right to health care. The court agreed, then added: “[W]hen a state chooses to provide such benefits, it may not do so in an arbitrary or discriminatory manner that adversely affects particular groups that may be unpopular.”