PORTLAND, Maine -- Maine voters dealt a severe blow to the gay rights movement by repealing a state law that would have allowed same-sex couples to marry.
The vote was close but nonetheless a huge defeat for gay activists in a corner of the country considered most sympathetic to their cause.
Voter turnout was high and the money came pouring in from across the country: conservatives who opposed the law brought in $2.5 million and supporters drew $4 million.
Opponents of gay marriage will likely use the success of the ballot box in Maine as a blueprint to defeat efforts to legalize same-sex marriages in others parts of the country.
Gay marriage has now lost in every single state -- 31 in all -- in which it has been put to a popular vote. Gay-rights activists had hoped to buck that trend in Maine -- known for its moderate, independent-minded electorate -- and mounted an energetic, well-financed campaign.
"The institution of marriage has been preserved in Maine and across the nation," declared Frank Schubert, chief organizer for the winning side.
Gay-marriage supporters conceded early Wednesday.
"We're in this for the long haul," said Jesse Connolly, manager of the pro-gay marriage campaign. "For next week, and next month and next year -- until all Maine families are treated equally. Because in the end, this has always been about love and family and that will always be something worth fighting for."
At issue was a law passed by the Maine Legislature last spring that would have legalized same-sex marriage. The law was put on hold after conservatives launched a petition drive to repeal it in a referendum.
The outcome Tuesday marked the first time voters had rejected a gay-marriage law enacted by a legislature. When Californians put a stop to same-sex marriage a year ago, it was in response to a court ruling, not legislation.
Five other states have legalized gay marriage -- starting with Massachusetts in 2004, and followed by Vermont, New Hampshire, Connecticut and Iowa -- but all did so through legislation or court rulings, not by popular vote. In contrast, constitutional amendments banning gay marriage have been approved in all 30 states where they have been on the ballot.
The defeat left some gay-marriage supporters bitter.
"Our relationship is between us," said Carla Hopkins, 38, of Mount Vernon, with partner Victoria Eleftherio, 38, sitting on her lap outside a hotel ballroom where gay marriage supporters had been hoping for a victory party. "How does that affect anybody else? It's a personal thing."
The contest had been viewed by both sides as certain to have national repercussions. Gay-marriage foes desperately wanted to keep their winning streak alive, while gay-rights activists sought to blunt the argument that gay marriage was being foisted on the country by courts and lawmakers over the will of the people.
Had Maine's law been upheld, the result would probably have energized efforts to get another vote on gay marriage in California, and given a boost to gay-marriage bills in New York and New Jersey.
Earlier Tuesday, before vote-counting began, gay-marriage foe Chuck Schott of Portland warned that Maine "will have its place in infamy" if the gay-rights side won.
Another Portland resident, Sarah Holman said she was "very torn" but decided -- despite her conservative upbringing -- to vote in favor of letting gays marry.
"They love and they have the right to love. And we can't tell somebody how to love," said Holman, 26.
In addition to reaching out to young people who flocked to the polls for President Obama a year ago, gay-marriage defenders tried to appeal to Maine voters' pronounced independent streak and live-and-let-live attitude.
The other side based many of its campaign ads on claims -- disputed by state officials -- that the new law would mean "homosexual marriage" would be taught in public schools.
Elsewhere on Tuesday, voters in Washington state voted on whether to uphold or overturn a recently expanded domestic partnership law that entitles same-sex couples to the same state-granted rights as heterosexual married couples. With half the precincts reporting, that race was too close to call.
In Kalamazoo, Mich., voters approved a measure that bars discrimination based on sexual orientation.
Among other ballot items across the U.S.:
-- In Ohio, voters approved a measure that will allow casinos in Cleveland, Columbus, Cincinnati and Toledo. Four similar measures had been defeated in recent years, but this time the state's reeling economy gave extra weight to arguments that the new casinos would create thousands of jobs.
-- Maine voters defeated a measure that would have limited state and local government spending by holding it to the rate of inflation plus population growth. A similar measure was on the ballot in Washington state.
-- Another measure in Maine, which easily won approval, will allow dispensaries to supply marijuana to patients for medicinal purposes. It is a follow-up to a 1999 measure that legalized medical marijuana but did not set up a distribution system.
-- The Colorado ski town of Breckenridge voted overwhelmingly to allow adults to legally possess small amounts of marijuana.
Fox News' Caroline Shively and The Associated Press contributed to this report.