EDEN PRAIRIE, Minn. (AP) — As second-in-command for Minnesota House Republicans, Rep. Jenifer Loon made a big gamble when she broke with her party’s prevailing view on gay marriage.

Loon’s vote to make same-sex legal prompted her former campaign manager to try to take her seat, and Loon now faces a tough primary challenge to be decided in the Aug. 12 election.

Gay and lesbian couples have been free to marry in Minnesota for a year now, but the political reverberations haven’t quieted. Loon and three other GOP House members backed the right of same-sex couples to marry; one decided against re-election and another ended his campaign rather than face probable defeat at a party endorsing convention. Some Democrats from districts where traditional marriage was the clear preference of 2012 voters could see their pro-gay marriage votes used against them this fall.

Sheila Kihne’s bid to unseat Loon has turned the Eden Prairie race into an expensive battle. Outside money is rushing in, some from groups that want the GOP to concentrate on fiscal issues and some from groups seeking to punish Loon for what they see as a family-values betrayal. Loon’s status as deputy minority leader and a potential candidate for higher office raises the stakes.

Loon won the district two years ago with almost 60 percent of the vote. By about the same margin, voters rejected a proposal to ban gay marriage via the state constitution. Loon had supported putting the ban on the ballot.

So when majority Democrats brought forward a bill to legalize gay marriage last year, Loon thought long and hard. She spent months sounding out constitutents and said she was on the fence until minutes before the vote — going so far as to write press releases for both “no” and “yes” votes. She wound up saying yes.

“I abided by what I believed to be the will of my voters,” she said.

That moment was the last straw for Kihne, a stay-at-home mom who led Loon’s first campaign six years ago, one that netted Loon the GOP endorsement.

“It was a huge flip-flop and a big-time trust was broken,” said Kihne, who said she was already unhappy because she felt Loon wasn’t sufficient committed to cutting state spending.

At first, Kihne set out simply to deny Loon the GOP endorsement for another term. But that effort soon morphed into a full-fledged campaign backed by other social conservatives and the Minnesota Family Council. The group’s ads portray Kihne as the “trusted conservative” who “will stand up for YOUR strong family values.” TV ads are also running, a rarity in legislative primaries.

The Freedom Minnesota PAC, a new group funded by business community donations and a New York hedge fund manager who champions gay rights, has come to Loon’s defense. It sent out mail ads promoting Loon as reliably conservative and quoting from Kihne’s Web blog that praised the incumbent as recently as 2010.

Loon backers have mined Kihne’s edgy writings on her Twitter feed and the now-defunct blog, including a post they say shows the challenger supported a poll tax for the poor. In an interview, Kihne insisted that post and other writings were “facetious” and “tongue-in-cheek.”

“I don’t believe in a poll tax,” she said.

Kihne is relying on support from people like Katie Norton, a Republican who volunteered for Loon in the past. Norton said Loon approached her the night before the endorsing convention to ask for her continued support but didn’t get it. Loon’s vote on the marriage law was just one factor; the fact she kept her stance to herself until the last minute shook Norton’s faith even more.

“I would have appreciated something like that. She didn’t say anything at all and then she voted that way,” said Norton, who’s now working for Kihne.

Low turnout is Loon’s main fear because it makes the outcome more unpredictable.

One afternoon this week, Loon carried a clipboard, a fold-out map and a stack of campaign literature as she maneuvered through a neighborhood where she knocked only on doors of presumed Republicans with a history of voting in primary elections. She said she’s hit 2,500 such homes in the past six weeks.

Loon kept her pitch short, thanking people for sending her to St. Paul on their behalf while asking for the chance to go back. On one porch, the homeowner complained about the avalanche of mail every day from Loon, Kihne and their allies. Up the street, she reminded the woman at the door, Jennifer Edlund, that the election was near and every vote was critical.

As Loon moved on, Edlund told a reporter that she had no complaints about Loon even if they don’t see eye-to-eye on all issues. Edlund said she is personally uncomfortable with government recognition of gay marriage, but she skipped the ballot question when voting in 2012 because she didn’t want to impose her own morals on others.

“I don’t agree with my husband 100 percent of the time. I’m not going to agree with Jenifer Loon 100 percent,” Edlund said. “Generally she has had a very good record.”

(© Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)