An appeals court ruled Thursday that the heart of a law that denies a host of federal benefits to gay married couples is unconstitutional.

The 1st U.S. Circuit Court of Appeals in Boston said the Defense of Marriage Act, which defines marriage as a union between a man and a woman, discriminates against married same-sex couples by denying them federal benefits.

The appeals court agreed with a lower court judge who ruled in 2010 that the law is unconstitutional because it interferes with the right of a state to define marriage and denies married gay couples federal benefits given to heterosexual married couples, including the ability to file joint tax returns.

The court didn’t rule on the law’s other provision, which said states without same-sex marriage cannot be forced to recognize gay unions performed in other states.