The other case, brought by Gay and Lesbian Advocates and Defenders, focused more narrowly on equal protection as applied to federal benefits. In that case, Judge Tauro agreed in 2010 that the law violated the equal protection clause of the Constitution by denying benefits to one class of married couples — gay men and lesbians — but not others.

The Obama administration initially appealed the lower court’s ruling. But last year, the Justice Department announced that it would stop defending DOMA, leaving Congress to appeal Judge Tauro’s ruling to the First Circuit. The House of Representatives’ Bipartisan Legal Advisory Group stepped in, hiring Paul D. Clement, a former United States solicitor general, to argue the appeal.

Massachusetts became the first state in the country to allow same-sex marriage in 2004. Other states have followed, and gay rights supporters are hoping that a series of legal challenges to DOMA around the country will ultimately lead to a Supreme Court ruling on the law. Judge Tauro struck down the section of the law that defines marriage as the union of a man and a woman for all federal purposes.

At the federal courthouse here on Wednesday, the arguments focused on what the appropriate constitutional test for DOMA should be: the relatively easy standard known as “rational basis,” or a tougher review that requires heightened scrutiny.

Mr. Clement — who last week argued before the Supreme Court on behalf of states challenging President Obama’s health care law — told the appeals panel that Congress had a rational basis for defining marriage as between a man and a woman. He said that in 1996, as Hawaii appeared to be the first state moving toward recognizing same-sex marriage, Congress passed the law out of concern that it should have its own definition of marriage.