A state judge upheld a 1913 law that prohibits out-of-state gay couples (search) from marrying in Massachusetts, where same-sex marriage (search) between residents has been legal since May.

The eight couples who filed the lawsuit — from Connecticut, Rhode Island, New Hampshire, Vermont, Maine and New York — sought a preliminary injunction blocking enforcement of the statute, claiming it is inherently discriminatory.

The law prohibits marriages that would not be legal in couples' home states.

In a ruling handed down Wednesday, Superior Court Judge Carol Ball (search) said the law is being applied equally to all nonresidents. For instance, it has been used to stop marriages of couples who didn't meet their states' age requirement for marriage.

"Clerks were instructed to do so for all couples and all impediments, not just for same-sex couples," Ball wrote.

Ball said Massachusetts has a rational reason to ensure that marriages it approves have validity in other states. However, she also said she sympathized with the plaintiffs and was "troubled" by the state's decision to suddenly begin enforcing the 91-year-old law.

An attorney for the couples said they are considering several avenues of appeal, and believe the case ultimately will be decided by the Massachusetts Supreme Judicial Court — the same panel that decided in November that the state should proceed with same-sex marriages.

"We always knew this was really just round one, and round two will be at the appellate court," said Michele Granda, with Gay and Lesbian Advocates and Defenders (search).

Since same-sex weddings began May 17, gay rights advocates have made out-of-state couples their next legal frontier.

A spokesman for Attorney General Tom Reilly said the decision "supports the principle that ... Massachusetts has a legitimate interest to respect the rights of other states to determine their own marriage laws."

Meanwhile, a federal judge in Washington state backed the 1996 Defense of Marriage Act (search). The decision, made public Tuesday, is the first to address the constitutionality of the federal law, which defines marriage as a "legal union between one man and one woman."

Two American women, Lee and Ann Kandu, were married in British Columbia and filed a joint bankruptcy petition in Tacoma a short time later. Their petition was opposed by the Justice Department on grounds that the federal marriage law prohibited it.

Federal bankruptcy Judge Paul B. Snyder found the bankruptcy code allows spouses to file joint petitions, but the marriage law specifies that 'spouse' refers only to a person of the opposite sex.

Snyder found that gays and lesbians have no fundamental right to marriage and that the 1996 does not violate the equal protection clause of the Constitution by allowing members of the opposite sex to wed but not members of the same sex.