ST. PAUL, Minn. - As some Republicans in the Minnesota Legislature weigh whether to support legalizing same-sex weddings, an analysis of gay-marriage votes from other states shows that GOP lawmakers who backed it often faced consequences, including loss of their seats.

After voters in the state resoundingly rejected a referendum that would have cemented a gay-marriage ban in the state constitution, supporters are gearing up for a likely vote this year that would legalize it. Although majority Democrats don't necessarily need any Republicans to pass it, a bipartisan effort would improve the measure's chances because some Democrats from rural areas are nervous about how gay marriage would be received by their socially conservative constituents.

Democratic leaders are also leery of a party-line vote for gay marriage, after years of accusing Republicans of fixating on social issues at the expense of the state's economy.

Still, Republicans inclined to back gay marriage face clear risks.

"It was largely responsible for my loss," said Jean White, a former Republican state senator in Colorado whose 2011 vote for civil unions became an issue in a primary challenge by a fellow Republican. In that contest, a Virginia-based conservative group mailed flyers that showed two men kissing and the title: "State Senator Jean White's Idea of `Family Values?'"

According to roll call votes analyzed by The Associated Press, in the eight times nationwide that state legislatures voted for gay marriage, just 47 Republicans bucked the party line out of many hundreds who voted against it.

Of those 47 Republicans who voted yes starting in 2009, only 21 are in office today. In New York, only one of four Republican senators who supported gay marriage is still in the Legislature. One lost a primary, one retired, and one lost the general election after narrowly winning a bitter primary. A New Hampshire Republican representative lost a primary after her 2009 vote for gay marriage, and in Maryland the former Senate Republican leader relinquished his leadership post when he started working with Democrats on a gay marriage bill that passed last year.

"I got a lot of flak, a lot," said that senator, Allan Kittleman. He's planning to leave the Senate this year to run for a county office instead.

In Washington, which passed gay marriage in 2012, two of six Republicans who backed the bill are no longer in office.

"One of my colleagues swore at me on the floor of the Senate during the vote," said former Washington senator Cheryl Pflug. "It was very difficult. It was kind of like an Amish shunning."

Several Republicans who voted yes said they're still secure in their personal conviction. White, the former Colorado senator, said two of her brothers have gay children. Pflug said she got to know gay colleagues at the Capitol and learned their lives were little different than hers. Kittleman cited his own father, a state senator in the 1960s who was a Republican trailblazer on civil rights for blacks.

Such dilemmas now loom for Minnesota Republican lawmakers. Legal gay marriage, until recently a longshot in Minnesota, has grown more likely in recent weeks. Gov. Mark Dayton is a vocal supporter, and Democratic legislative leaders have said they wouldn't block the bill. A crowd of more than a thousand pro-gay marriage activists gathered at the Capitol Thursday for a rally, with DFL lawmakers and religious leaders arguing that last fall's defeat of the gay marriage ban cleared the path to legalize it. No GOP lawmakers were at the rally.

A gay marriage bill is likely to be introduced by the end of February.

Many Republicans, even some known as moderates, are ready to vote no. Even Rep. Tim Kelly, the only Republican still in Minnesota's Legislature who voted in 2011 against putting the amendment on the ballot, said he wished Democrats wouldn't raise the issue this year. "I think they're overplaying their hand," said Kelly, of Red Wing, saying he'd prefer legal protections for gay couples short of marriage.

There are 29 Republican lawmakers who represent House or Senate districts that voted against the proposed gay-marriage ban. Many are reluctant to say how they might vote on legalizing it, including Jenifer Loon of socially moderate Eden Prairie, the second-ranking House Republican.

"I'm not drawing any lines in the sand," said Sen. Carla Nelson, a Republican whose Rochester district voted against the amendment.

"I'll say that we do expect Republican lawmakers to be with us on this issue," said Autumn Leva, spokeswoman for Minnesota for Marriage, the group fighting the bill. Leva said she expected Republicans who stray would risk conservative primary challengers backed by national groups opposed to gay marriage.

Jake Loesch, spokesman for pro-gay marriage Minnesotans United, predicted a few Republicans would back gay marriage.

"There are definitely Republican members of the Legislature who I think are very much on the fence and trying to decide what to do," said Loesch, a former Senate Republican staffer.

Pflug argued that the party's rigid stance on the issue is costing it votes from young people, suburban women and other demographics.

"I think a lot of conservative elected Republicans are going to go down with the ship on this one," Pflug said. "I think the Republican Party is at a crossroads."