A U.S. Ninth Circuit Court of Appeals judge on Wednesday ruled that Oregon's ban on gay marriage violates the U.S. Constitution.

Voters in 2004 approved ballot Measure 36, which amended the Oregon Constitution to define marriage as a heterosexual union. The push for an amendment was in response to roughly 3,000 gay couples being allowed to marry in Multnomah County, which includes Portland. Officials argued that no law existed preventing such unions.

“Under rational basis review, Measure 36 does not pass constitutional muster,” Judge Harry Pregerson wrote in his ruling. “Here, Oregon does not state any reason for preventing same-sex couples from marrying.”

“While other possible objectives for Measure 36 exist, I can see no objective that is rationally related to banning same-sex marriages, other than the objective of denigrating homosexual relationships. This objective amounts to a desire to harm a minority and is therefore impermissible under [Supreme Court cases] Romer and Cleburne. … Thus, Measure 36 reveals itself to be 'wholly without any rational basis' and is therefore unconstitutional.”

Pregerson also declared unconstitutional the Defense of Marriage Act (DOMA), the federal statute which prevents federal agencies from recognizing the legal marriages of gay couples.

The ruling comes in a case that was not a direct challenge to the state's ban. Instead, married plaintiffs Alison Clark and Anna Campbell alleged they were the victims of sexual orientation discrimination stemming from a denial of benefits. Clark's employer, the Administrative Office of the United States Courts, said it denied her application for spousal benefits pursuant to DOMA regulations.

“Clark and Campbell's validly executed [Canadian] marriage should therefore be recognized as a valid marriage in Oregon,” Pregerson wrote. “I next consider whether, given Clark and Campbell's valid marriage, it is constitutionally permissible for the federal government to deny Clark's request for spousal FEHB benefits for Clark. I hold that it is not.”

Marriage equality advocates in Oregon are eyeing a 2014 referendum to repeal the amendment.

(Related: Oregon gay marriage push begins.)