Five legally married same-sex couples filed a lawsuit on Monday to challenge the 1996 law that bars the federal government from recognizing same-sex marriages, arguing that its impact is particularly harsh on couples that include an American citizen and a foreigner.

The lawsuit, filed in United States District Court for the Eastern District of New York, was brought by Immigration Equality, a gay rights legal organization that focuses on immigration issues. Same-sex marriage advocates said it was likely to become the most prominent suit seeking to overturn the law, known as the Defense of Marriage Act, based on its effect on gay or lesbian immigrants who want to gain legal residence through marriage to American citizens.

Under immigration law, a citizen can apply for a foreign spouse to obtain legal permanent residency, with a document known as a green card. Since unlike many other visas, there are no limits on the number of green cards available to spouses of citizens, those applications are among the fastest and most straightforward procedures in the immigration system.

Under the marriage act, which is called DOMA, federal authorities do not recognize same-sex marriages, even from states that allow them. In recent years, as same-sex marriage became legal in several states, gay and lesbian couples have come forward to say they were facing a painful choice: either deportation for the immigrant or exile to life in a foreign country for the American.