A judge will decide whether a 1913 state law being used to prevent out-of-state gay couples (search) from getting married in Massachusetts (search) is discriminatory and should be struck down.

An attorney for eight same-sex couples from other states asked Superior Court Judge Carol Ball Tuesday for an injunction blocking the state from enforcing the law, which prohibits marriages in Massachusetts that would be illegal in a couple's home state.

Massachusetts is the only state where same-sex marriages (search) are recognized.

The attorney, Michele Granda, argued that the 1913 statute violates both the U.S. Constitution and state law.

"We're asking the court to tear down the fence of discrimination that's been erected around (the state's) borders," she said.

Assistant Attorney General Peter Sacks countered that the law protected other states' rights to define marriage as they see fit, a principle repeatedly cited by the Massachusetts Supreme Judicial Court in its landmark November ruling legalizing gay marriage.

Sacks said that ruling defines marriage as "two willing spouses and an approving state." Since no other state allows gay marriages, that standard is not met anywhere but in Massachusetts, he said.

Ball gave the state until Aug. 2 to file its response. She did not say when she would rule, but noted: "From what I've read so far, it appears the state is applying the law in a procedurally nondiscriminatory manner."

Republican Gov. Mitt Romney, a gay marriage opponent, has invoked the 1913 law to bar gay couples from other states from getting married here.

When gay marriages began May 17, some municipal clerks openly defied Romney and issued licenses to anyone who applied. But Massachusetts' attorney general, acting on Romney's instructions, ordered them to stop.

Legal experts have said the law was passed to prevent interracial couples from getting married. But the attorney general has said there is no evidence lawmakers were motivated by race.

At any rate, the law was ignored for decades before the high court cleared the way for the nation's first state-sanctioned gay weddings to begin this spring, Granda said.

Sacks did not dispute that assertion. "Certainly enforcement has been increased because there's much more reason than there was before to expect violations," he said.

Of the eight couples who filed the lawsuit, two are from Connecticut, two from Rhode Island, and one each from New Hampshire, Vermont, Maine and New York.

Five of the couples were married in Massachusetts by clerks who ignored the 1913 law, while the three others were turned away when they tried to get marriage licenses.

In New York on Tuesday, New Paltz Town Justice Judith Reichler dismissed criminal charges against two Unitarian Universalist ministers who married same-sex couples.

Reichler said the state has displayed an anti-gay bias and she sharply questioned the constitutionality of the state's gay marriage ban.

The Revs. Kay Greenleaf and Dawn Sangrey were charged in March with solemnizing marriages for 13 same-sex couples without a license in the Hudson Valley Village of New Paltz.

"Mixed-sex couples who do not love each other can marry. Couples who do not even like each other can marry," Reichler said. "Regardless of the relationship a married couple has, legal privileges are granted to improve their economic, emotional and physical health — simply because of their marital status. There can be no constitutional rationale for denying same-sex couples the right to receive the benefits that are so lavishly bestowed on mixed-sex couples."