Boston (AP) - A federal judge's rulings in Massachusetts that the federal law banning gay marriage is unconstitutional could have implications far beyond the state if they're upheld by a higher court after an appeal by the Obama administration, legal experts say.

U.S. District Judge Joseph Tauro said the law, the Defense of Marriage Act, interferes with the right of a state to define marriage and therefore denies married gay couples some federal benefits. He ruled Thursday in favor of gay couples' rights in two separate challenges to DOMA, which the administration of President Barack Obama has argued for repealing.

The rulings apply to Massachusetts, but if a higher court with a broader jurisdiction were to hear an appeal and agree with the judge's rulings, their impact would spread, said Boston College professor Kent Greenfield, a constitutional law expert. The rulings might encourage other attorneys general who oppose DOMA to sue to try to knock it down, he said.

"One thing that's going to be really interesting to watch is whether the Obama administration appeals or not," he said.

An appeal would be considered by the First Circuit, which also includes Rhode Island, Maine and New Hampshire.

The Department of Justice didn't immediately say whether it would appeal; it was reviewing the judge's decisions, spokeswoman Tracy Schmaler said.

Massachusetts had argued the law denied benefits such as Medicaid to gay married couples in the state, where same-sex unions have been legal since 2004.

The judge agreed and said the law forces Massachusetts to discriminate against its own citizens to be eligible for federal funding in federal-state partnerships.

The act "plainly encroaches" upon the right of the state to determine marriage, the judge said in his ruling on a lawsuit filed by state Attorney General Martha Coakley. In a ruling in a separate case filed by Gay & Lesbian Advocates & Defenders, or GLAD, the judge said the act violates the equal protection clause of the U.S. Constitution.

"Congress undertook this classification for the one purpose that lies entirely outside of legislative bounds, to disadvantage a group of which it disapproves," he wrote. "And such a classification the Constitution clearly will not permit."

One of the plaintiffs in the GLAD lawsuit, Nancy Gill, said she was "thrilled" with the rulings.

"I'm so happy I can't even put it into words," she said.

Gill and Marcelle Letourneau married in Massachusetts in 2004 after being together for more than 20 years.

When Gill, a U.S. postal worker, tried to add Letourneau to her family health plan, she was denied. The couple was forced to get separate insurance for Letourneau, who has a medical transcription business at home and does administrative work for the local Visiting Nurse Association.

Letourneau called the rulings "life-changing."

"I can get on Nancy's insurance," she said. "That's just a huge victory, and it gives us peace of mind."

Coakley called it a "landmark decision" and "an important step toward achieving equality for all married couples in Massachusetts."

The Department of Justice had argued the federal government had the right to set eligibility requirements for federal benefits -- including requiring that those benefits go only to couples in marriages between a man and a woman.

Opponents of gay marriage said they were certain the rulings would be overturned on appeal.

Andrea Lafferty, executive director of the Traditional Values Coalition, called the judge's rulings "judicial activism" and said he was a "rogue judge." Gay marriage advocates will keep pushing their agenda in the courts, she said, but noted voters consistently have rejected gay marriage at the ballot box, including in a recent California vote.

"We can't allow the lowest common denominator states, like Massachusetts, to set standards for the country," Lafferty said.

Tom McClusky, senior vice president of the conservative Family Research Council, said the rulings result in part from "the deliberately weak legal defense of DOMA" that the Obama administration mounted on behalf of the government.

"While the American people have made it unmistakably clear that they want to preserve marriage as the legal union of one man and one woman, liberals and activist judges are not content to let the people decide," McClusky said in a statement.

The law was enacted by Congress in 1996, when it appeared Hawaii would soon legalize same-sex marriage and opponents worried that other states would be forced to recognize such marriages. The lawsuit challenges only the portion of the law that prevents the federal government from affording pension and other benefits to same-sex couples.

Since then, five states and the District of Columbia have legalized gay marriage.