WASHINGTON (Reuters) - The Obama administration on Friday urged a U.S. court to dismiss a lawsuit by gay married couples from Massachusetts who say they were unlawfully denied federal marriage benefits.

Gay marriage supporters are seen through a gay pride flag outside the Massachusetts State House in Boston November 9, 2006. REUTERS/Brian Snyder

President Barack Obama won strong support from gays during his presidential campaign and has pressed for repealing the 1996 Defense of Marriage Act that bars the federal government from recognizing same-sex marriages.

But the gay community has been angered by the Obama administration’s defense of the law in court proceedings. Justice Department officials say they are obligated to defend federal statutes when they are challenged.

“In making this filing, the department is bound by the only precedent that exists, which is that no court has found such a right to federal benefits based upon marital status to be constitutionally required,” said Justice Department spokeswoman Tracy Schmaler.

The filing in the U.S. Court for the District of Massachusetts “points out the administration’s position that Congress should extend federal benefits to spouses in same-sex marriages,” she said.

Massachusetts was the first state to legalize same-sex marriages but those couples cannot access federal protections and programs granted to heterosexual married couples, prompting legal challenges.

The lawsuit, filed on behalf of seven same-sex couples and three survivors of same-sex spouses, says it is unconstitutional to bar them from enrolling in federal healthcare programs, receiving certain retirement and survivor benefits and filing joint income tax returns.

“No court has found such a right to federal benefits to be fundamental -- and the federal courts that have considered the question in the context of DOMA (Defense of Marriage Act) itself have rejected such a claim,” the Justice Department said in the filing.

The department urged that the lawsuits be dismissed because their claims either were without merit or the individuals did not have a legal right to sue.

Obama in June extended a few benefits, including opening the government’s long-term care insurance to gay partners of federal employees and allowing federal employees to use their sick leave to tend to a gay partner or the partner’s children.

Massachusetts in July sued the U.S. government to seek federal benefits for about 16,000 same-sex couples who have been married in the state.