(CNN) -- The Obama Justice Department filed a notice of appeal Tuesday declaring its intention to appeal a U.S. District Court ruling that a federal law defining marriage as between a man and a woman was unconstitutional.
The 1996 Defense of Marriage Act also allows states to ignore same-sex marriages performed in other states.
U.S. District Judge Joseph Tauro in Massachusetts ruled in July in favor of gay and lesbian couples who said the law forced the state to discriminate against gay men and lesbians.
President Barack Obama, who said during the 2008 presidential campaign that he opposes same-sex marriage, has also said he opposes the federal law and that it should be repealed. He has not, however, endorsed a Democratic effort to repeal it.
"The Justice Department is defending the statute, as it traditionally does when acts of Congress are challenged," said Department of Justice spokeswoman Tracy Schmaler. "As a policy matter, the president has made clear that he believes DOMA is discriminatory and should be repealed. The Department of Justice has a longstanding practice of defending federal statutes when they are challenged in court, including by appealing adverse decisions of lower courts."