Gay rights moved to the forefront of the presidential campaign Tuesday after Democratic Sen. Barack Obama's announcement that he opposes a November ballot measure that would ban same-sex marriage in California.

Obama's position on Proposition 8 was announced at a club event Sunday. Last week, Arizona Sen. John McCain, the expected GOP standard-bearer in November, told officials of Protect Marriage, a coalition that gathered 1.1 million signatures for the California measure, that he backs their efforts "to recognize marriage as a unique institution between a man and a woman."

For both campaigns, the decision to get involved in the same-sex marriage debate carries political risks.

California is one of three states with same-sex marriage bans on the November ballot. While the state is seen as Obama country, and Arizona is McCain's home state, Florida, the third state seeking to limit marriage to a man and a woman, is a swing state that will be a major prize in the November election.

Obama is skating gingerly past his previous position on the issue.

The Illinois senator has said repeatedly that he believes marriage should be only between man and a woman. When the California Supreme Court overturned the state's ban on same-sex marriage in May, Obama released a carefully nuanced statement saying he respected the court's decision, believed states should make their own decisions on marriage and "will continue to fight for civil unions as president."

"Senator Obama supports civil unions, and he has consistently opposed federal and state constitutional marriage amendments because as we have seen in some states, enshrining a definition of marriage into the constitution can allow states to roll back the civil rights and benefits that are provided in domestic partnerships and civil unions."

But civil unions, gay activists argue, aren't the same as marriage, and they say his earlier stance would put Obama on the wrong side of what's increasingly seen as a civil rights issue.

Support welcomed

Groups opposing Prop. 8, which would amend the state Constitution to say that "only marriage between a man and a woman is valid or recognized in California," were excited to have Obama on their side and more than willing to overlook his mixed record on the same-sex marriage issue.

"It's great to see Sen. Obama's statement, which is consistent with what he has said in the past about allowing each state to make its own decision," said Geoff Kors, executive director of Equality for All, which is heading the Prop. 8 opposition. "Is it ideal that he doesn't support same-sex marriage? No. But it's important when political leaders say gay and lesbian couples should be treated equally."

Still, the Obama campaign didn't go out of its way to announce the senator's position on a controversial California ballot measure that will have repercussions across the nation. Instead of a splashy public endorsement ceremony, complete with beaming supporters of same-sex marriage, Obama announced his support midway in his letter, which was read at the club's annual breakfast.

"I was thrilled to see the senator step up to the plate and say how he feels about discrimination," he said. And while Obama might personally oppose same-sex marriage, Turman said the candidate "is well on the way to being educated."

But Prop. 8 supporters accused Obama of trying to have it both ways by coming out publicly against same-sex marriage, but opposing any efforts to ban those unions.

It's no surprise to see McCain on the side of the same-sex marriage ban. While he opposed a GOP-backed federal constitutional amendment to ban same-sex marriage in 2004, McCain supported a failed 2006 Arizona initiative that would have blocked domestic partnerships as well as same-sex marriages.

Both Obama and McCain have called for individual states to decide how to handle same-sex marriage, and the November elections will show where voters in those three states stand.

Early polls show that while the Prop. 8 race is likely to be a close contest in California, many of the young and liberal voters who back Obama are strongly opposed to the same-sex marriage ban. But those groups of voters don't have nearly as much clout elsewhere in the nation. A CBS poll taken early in June showed that only about 30 percent of American voters favored legalizing marriage for same-sex couples.

A single loss

Only one of the more than two dozen state ballot measures banning same-sex marriage has ever lost, and that was the 2006 Arizona measure that also would have eliminated domestic partner benefits in the state.

But while the same-sex marriage question will come up during the fall campaign, experts don't believe it will have the same effect as it did in 2004, when politicians like California Sen. Dianne Feinstein suggested that San Francisco Mayor Gavin Newsom's open door to same-sex marriage might have cost Massachusetts Sen. John Kerry the presidency.

Nationwide, the country's economic woes and the war in Iraq are likely to play much more of a role than same-sex marriage in the November election, said Bruce Cain, a UC Berkeley political science professor.

"Obama's position (on same-sex marriage) can be used against him in a few states, like Ohio and Pennsylvania," Cain said. "But same-sex marriage is unlikely to have anything like the impact it did in 2004 since issues like the economy and the war will provide him with a lot more cover than Kerry had."

Obama's letter opposing same-sex marriage ban

Thank you for the opportunity to welcome everyone to the Alice B. Toklas LGBT Democratic Club's Pride Breakfast and to congratulate you on continuing a legacy of success, stretching back thirty-six years. As one of the oldest and most influential LGBT organizations in the country, you have continually rallied to support Democratic candidates and causes, and have fought tirelessly to secure equal rights and opportunities for LGBT Americans in California and throughout the country.

As the Democratic nominee for President, I am proud to join with and support the LGBT community in an effort to set our nation on a course that recognizes LGBT Americans with full equality under the law. That is why I support extending fully equal rights and benefits to same sex couples under both state and federal law. That is why I support repealing the Defense of Marriage Act and the "Don't Ask Don't Tell" policy, and the passage of laws to protect LGBT Americans from hate crimes and employment discrimination. And that is why I oppose the divisive and discriminatory efforts to amend the California Constitution, and similar efforts to amend the U.S. Constitution or those of other states.

For too long. issues of LGBT rights have been exploited by those seeking to divide us. It's time to move beyond polarization and live up to our founding promise of equality by treating all our citizens with dignity and respect. This is no less than a core issue about who we are as Democrats and as Americans.

Finally, I want to congratulate all of you who have shown your love for each other by getting married these last few weeks. My thanks again to the Alice B. Toklas LGBT Democratic Club for allowing me to be a part of today's celebration. I look forward to working with you in the coming months and years, and I wish you all continued success.