The Defense of Marriage Act was ruled unconstitutional on Thursday, striking down a key part of the law banning federal recognition of same-sex marriages.
DOMA defines marriage as unions exclusively between a man and a woman.
The 1st Circuit U.S. Court of Appeals, based in Boston, says the law prevents same-marriage couples from receiving benefits.
The law was enacted in 1996, when Hawaii tried to legalize same-sex marriages.
Since then, several states have tried to battle the law in court.
Massachusetts had challenged the law on behalf of a same-sex couple.
Marriage between same-sex couples is currently legal in seven states and the District of Columbia.