A federal judge has blocked Arizona from ending domestic partner benefits for gay and lesbian state employees.

U.S. District Judge John Sedwick's Friday injunction prevents 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 last September eliminated health benefits to the spouses of domestic partners – gay or straight. The move adversely affected gay couples, who cannot marry in the state.

Lawyers representing the state argued that the measure was needed to cut a ballooning deficit.

But Sedwick chided lawmakers for placing the budgetary burden on gay workers.

“Contrary to the state's suggestion, it is not equitable to lay the burden of the state budgetary shortfall on homosexual employees, any more than on any other distinct class, such as employees with green eyes or red hair,” Sedwick wrote in his 33-page ruling.

About 800 state employees are affected, according to the state.

Officials have not announced whether they will appeal the ruling.