The New York attorney general, Eric T. Schneiderman, on Tuesday asked a federal court to overturn the Defense of Marriage Act, arguing that the law violates the rights of the gay couples who began legally marrying across the state on Sunday.

In an interview, Mr. Schneiderman said that he and his staff began preparing a challenge to the Defense of Marriage Act, which bars federal recognition of same-sex marriages, as soon as the State Legislature voted to legalize the unions last month.

“This is very clearly and simply about equal justice under law for all Americans and all New Yorkers,” Mr. Schneiderman said. “I’m proud of the fact that we have passed marriage equality in this state, as a New Yorker. And as the attorney general, I intend to protect that statute as vigorously as I can.”

Mr. Schneiderman opted to test the federal law by filing a brief in an existing case, Windsor v. United States, in which Edith S. Windsor, 82, is challenging the federal government’s decision to collect estate taxes upon the death of Ms. Windsor’s wife, Thea C. Spyer, in 2009. The couple lived in New York City, and married in Canada in 2007 after decades together.

Mr. Schneiderman said the decision to file a brief, as opposed to his own lawsuit against the federal government, was a matter of efficiency, given the Windsor lawsuit’s status as a test case for the constitutionality of the Defense of Marriage Act. “This is the fastest way to get action to protect New York’s marriage equality statute,” he said.

Mr. Schneiderman, a Democrat who took office in January after serving 12 years as a state senator from the Upper West Side, had pledged during his campaign for attorney general that he would join the legal fight against the Defense of Marriage Act.

In his brief, Mr. Schneiderman asserted that the act violated the right to equal protection under the law for gay couples, including the hundreds who have wed this week in New York.

“Without such equal treatment by the federal government,” Mr. Schneiderman wrote, “New York’s statutory commitment to marriage equality for all married couples will be substantially unrealized.”

Ms. Windsor’s legal challenge was one of two lawsuits that prompted President Obama in February to direct the Justice Department to stop defending the Defense of Marriage Act, which Mr. Obama said he believed was unconstitutional. The House has since intervened to defend the law, and the case is still pending.

A few other legal challenges to the Defense of Marriage Act are being considered in federal courts, the result of several high-profile lawsuits that were filed in California, Connecticut and Massachusetts by married same-sex couples seeking federal benefits afforded to heterosexual married couples.

Massachusetts, which was the first state to legalize same-sex marriage, sued the federal government in 2009 to contest the act’s constitutionality. A federal judge ruled in that state’s favor last year, and an appeal — also to be led by lawyers for the House — is now pending.

A spokesman for the House speaker, John A. Boehner, did not respond to a request for comment on Tuesday.

Mr. Schneiderman will also represent the New York Senate in a lawsuit filed on Monday by a conservative group that accused state lawmakers and Gov. Andrew M. Cuomo of committing procedural improprieties in the course of passing the state’s Marriage Equality Act.

“I am confident that our defense of that statute will be successful,” Mr. Schneiderman said. “It was legitimately passed, and a legitimate exercise of the power of the Legislature and the governor, and I will defend it.”



