A federal judge in California has struck down a federal code defining a spouse for the purpose of Veterans' benefits to be a person of the opposite sex.

U.S. District Judge Consuelo Marshall ruled that Title 38 of the U.S. Code is unconstitutional.

“The Court finds that the exclusion of spouses in same-sex marriages from veterans' benefits is not rationally related to the goal of gender equality,” Marshall wrote in her 4-page ruling. “The denial of benefits to spouses in same-sex marriages is not rationally related to any of these military purposes.”

Tracey Cooper-Harris had served in the Army for about 12 years. She retired in 2003 with an honorable discharge.

When Cooper-Harris, who suffers from multiple sclerosis, and her wife, Maggie Cooper-Harris, applied to the Department of Veterans Affairs seeking additional money and benefits married veterans are entitled to received, they were denied.

The Southern Poverty Law Center filed the case on behalf of the couple in 2012.

The women married in California in 2008 during the brief window when gay couples were eligible to marry.