The federal law that excludes same-sex couples from the benefits of marriage is constitutionally sound, a federal judge in Southern California declared Thursday in a case that could reach the U.S. Supreme Court.

Ruling in a suit by two gay men who were denied a marriage license in Orange County, U.S. District Judge Gary Taylor said the 1996 federal Defense of Marriage Act promotes "the stability and legitimacy of what may reasonably be viewed as the optimal union for procreating and rearing children by both biological parents."

Taylor declined the couple's request to rule on the constitutionality of California's law, which -- like laws in effect in every state except Massachusetts -- allows only opposite-sex couples to marry. He noted that a San Francisco judge's ruling in March, which found that the law violates the rights of gays and lesbians to marry the partner of their choice, was based entirely on the California Constitution. That ruling is on hold during the state's appeal.

But the significance of Taylor's decision is that it was only the third in the nation to address the validity of the Defense of Marriage Act, and the only one headed for appeal to higher courts. Rulings in Washington state and Florida, upholding other aspects of the law, have not been appealed.

"You don't tell a slave that it's not a good time to bring a case to be freed, to just remain as a slave until some political action committee feels it's a good time," Gilbert said. "You'd never say to a victim of civil rights abuse that this isn't a convenient time to address your rights. It's like telling a person in a burning building that this isn't a convenient time to exit."

But lawyers who challenged the California marriage law in the San Francisco case said it's too early to take the marriage issue to federal courts and risk an unfavorable ruling by an appeals court or the U.S. Supreme Court.

"We wish this case had not gone forward," said attorney Shannon Minter of the National Center for Lesbian Rights, which represents 12 same-sex couples. The inability of gays and lesbians to marry makes it difficult to bring the human impact of laws like these before the court and makes it more likely that the federal law will be upheld, Minter said.

San Francisco City Attorney Dennis Herrera, who is contesting California's marriage law in state court, joined Minter's group in asking Taylor to dismiss the federal case on the grounds that an unmarried couple isn't affected by the federal law. The judge disagreed, saying registered domestic partners like the plaintiffs in this case might qualify for federal marriage benefits if the federal law didn't exclude them. Chief Deputy City Attorney Therese Stewart said the office would probably renew the argument before the appeals court.

The law, signed by then-President Bill Clinton, reserved federal benefits -- joint tax filing, Social Security survivors' rights, immigration status and numerous other marital privileges -- to opposite-sex couples. Another provision of the law, not involved in this case, allows states to refuse to recognize same-sex marriages performed in another state or nation.

The suit was filed in September by Christopher Hammer and Arthur Smelt of Mission Viejo after they were twice denied a marriage license in Orange County. They have been a committed couple since 1997.

The argument that prevailed in the state case -- that the marriage restriction violates the fundamental right to marry the partner of one's choice -- was rejected by Taylor.

Fundamental rights under the U.S. Constitution are limited to those that are "deeply rooted in this nation's history and tradition" for at least a half century, he said, quoting a Supreme Court ruling, adding that no such tradition exists for same-sex marriage.

Congress could have plausibly believed that allowing only opposite-sex couples to marry would encourage the best environment for raising children, Taylor said.