On Thursday, a federal appeals court in Boston ruled that the government's ban on gay marriage, called the Defense of Marriage Act (DOMA), violates the Constitution and should be struck down.

If the Supreme Court hears the case and upholds this ruling, it means that the federal government would most likely have to recognize the marriages of gay couples who were wed and reside in the six states that allow same-sex unions.

The First Circuit Court found that the federal government does not have a right to interfere in states' definition of marriage, but stopped short of arguing that gay people have a constitutionally protected right to legal marriage. The First Circuit court is the first federal appeals court to strike down the law, and the case is likely to be taken up by the Supreme Court next year.

[Related: Obama touts support for gay marriage in video]

A section of DOMA, which was passed under President Bill Clinton, says that gay married couples are ineligible for federal benefits afforded to straight married people, such as tax breaks and Social Security survivor checks. DOMA encompasses about 1,000 federal laws tangentially related to marriage and affects 100,000 couples in the country, according to the decision. A group of gay couples in Massachusetts sued the government over the law, and the state of Massachusetts filed its own suit, saying DOMA makes its Medicaid program illegal because the state combines gay married couples' incomes in calculating eligibility. (Gay marriage is legal in Massachusetts.)

The Justice Department under President Barack Obama initially defended DOMA against this lawsuit, but last year announced that it found DOMA unconstitutional and would no longer back it. House Republicans then appointed outside attorneys to argue for the federal law.

[Related: Obama's gay marriage stance could hurt him, poll finds]

The judges admitted that the decision rested on navigating difficult and thorny precedents. "Only the Supreme Court can finally decide this unique case," they wrote.

Story continues

But in its decision, the First Circuit argued that the federal government has no interest in rejecting states' definition of marriage, and that the singling out of a minority group—gays and lesbians—was troubling.

"Many Americans believe that marriage is the union of a man and a woman, and most Americans live in states where that is the law today," the First Circuit wrote. "One virtue of federalism is that it permits this diversity of governance based on local choice, but this applies as well to the states that have chosen to legalize same-sex marriage. Under current Supreme Court authority, Congress' denial of federal benefits to same-sex couples lawfully married in Massachusetts has not been adequately supported by any permissible federal interest."

[Related: Bristol Palin chastises Obama for gay marriage position]

If the case makes it to the Supreme Court, all eyes will (as usual) be on Justice Anthony Kennedy, who moved to strike down laws banning anal sex in 2003 and a Colorado law that banned anti-discrimination rules that included gay people. So far, the Supreme Court has never held that sexual orientation can put people in a protected class, as it has with race and a few other things.

"I think this really does set up the issue for the Supreme Court to take this up next year," said Erwin Chemerinsky, a liberal constitutional law professor at UC Irvine.

The decision marks the latest court victory for gay rights proponents after the Ninth Circuit Court of Appeals struck down California's ban on gay marriage in February. After North Carolina voters inserted a ban on gay marriage and civil unions into their Constitution in May, Obama announced that he personally thinks gay people should allowed to be married. But he stopped short of saying that the federal government should guarantee that right, indicating that states should decide.