PORTLAND, Maine (Reuters) - Voters in Maine on Tuesday overturned a law allowing same-sex couples to wed, dealing a fresh setback to the U.S. gay marriage movement in a race that attracted national attention.

The law was approved by Maine’s Legislature in May but was not implemented after opponents gathered enough signatures to put the issue to a “people’s veto.”

With 87 percent of precincts reporting, votes to reject the law were running at 52.75 percent to 47.25 percent, according to unofficial tallies from the Bangor Daily News.

Frank Schubert, chief organizer of the “Yes on 1” campaign to reject same-sex marriage in the state, claimed victory early on Wednesday, although his opponents refused to concede.

Connecticut, Iowa, Massachusetts, New Hampshire and Vermont are the only U.S. states where a same-sex marriage law is on the books. In each instance, the laws were approved by legislatures and judges, not by popular vote.

Citizens in some 30 states before Maine voted against same-sex marriages.

The referendum in sparsely populated Maine was thrust onto the national stage, attracting large levels of funding and battle-hardened strategists.

The outcome is “further evidence that although voters have shown tolerance toward same sex couples, they draw the line at marriage,” said Jeff Flint, a partner with Schubert Flint Public Affairs in Sacramento, who worked on California’s “Yes on 8” campaign in 2008. “They feel marriage is different.”

Groups in favor of traditional marriage prevailed in Maine even though they were outspent two-to-one by the “No on 1” groups, Flint said.

Slideshow ( 7 images )

The push to repeal got powerful help from Portland’s Catholic Bishop Richard Malone, who spoke out repeatedly against the legalization of same-sex marriage. About 37 percent of Maine’s population is Roman Catholic.

Slideshow ( 7 images )

STATE OF THE UNIONS

Several U.S. states have statutes sanctioning various kinds of civil unions for same-sex couples.

But those do not carry many of the same legal protections as actual marriages, such as the ability to share healthcare benefits with a partner, or inheritance rights.

“There were real inequalities in terms of Maine’s statutes. Civil unions did not equal civil marriages,” Maine Governor John Baldacci, a Democrat, said on local television of his decision to support the gay marriage law.

Maine’s initiative was closely followed after California’s bitter same-sex marriage fight in 2008. Proposition 8 upended a state Supreme Court ruling that same-sex couples have a constitutional right to marry.

Some of the best known national gay and lesbian rights groups would like to wait and watch before attempting to turn back Proposition 8.

But John Henning, executive director of the group Love Honor Cherish in Los Angeles said Maine’s vote was likely to catalyze grass-roots action in several states.

“It will light a fire under activists and be a reminder that we all had our right to marry taken away in California,” he said.