Massachusetts' attorney general filed a lawsuit on Wednesday against the U.S. government that seeks federal marriage benefits for about 16,000 gay and lesbian couples who have legally wed in Massachusetts.

The state is challenging the constitutionality of the federal 1996 Defense of Marriage Act, saying the law denies essential rights and protections to same-sex couples who have married since Massachusetts became the first state in the nation to legalize gay weddings in 2004.

The federal law interferes with the state's sovereign authority to define and regulate marriage, according to the suit filed in federal court in Boston. It calls the law overreaching and discriminatory.

The suit is the latest skirmish over gay marriage in the U.S. federal court system after handful of political filmmakers led by a Democratic consultant crafted a gay rights challenge in May that they hope will reach the U.S. Supreme Court.

It also follows a separate lawsuit filed by a group of married gay couples in Massachusetts in March that also challenged the same portion of the Defense of Marriage Act that defines marriage as a legal union between a man and a woman.

Although Massachusetts and five other U.S. states have authorized gay marriage, same-sex couples who are legally married in those states cannot access the federal protections and programs granted to straight married couples.

The Defense of Marriage Act, or DOMA, denies gay and lesbian couples access to more than 1,000 federal programs and legal protections, gay rights advocates say.

Massachusetts Attorney General Martha Coakley, who filed the suit, cited several benefits denied gay couples, including federal income tax credits, employment and retirement benefits, health insurance coverage, and Social Security payments.

We view all married persons equally, Coakley told a news conference.

Before 1996, states had the right to define marital status under state sovereignty, the suit said. Massachusetts wants the right to define marriage within its own boundaries, it added, noting that this would not affect other states.

In enacting DOMA, Congress overstepped its authority, undermined states' efforts to recognize marriages between same-sex couples, and codified an animus toward gay and lesbian people, the state's 32-page complaint said.

Forty-two U.S. states have laws explicitly prohibiting such marriages, including 29 with constitutional amendments restricting marriage to one man and one woman, according to the Human Rights Campaign, a gay rights advocacy group.