A Republican lawmaker dropped his re-election bid in the face of a challenge from within his party over his backing of same-sex marriage.

Republican state Rep. David FitzSimmons, one of just a handful of GOP House members to vote for gay marriage legalization last year, announced his retirement Saturday during a fight for endorsement from local activists. He was challenged by Republican Eric Lucero and others. Much of Lucero’s opposition to FitzSimmons focused on the lawmaker’s vote to legalize same-sex marriage. Lucero won overwhelming backing at a Saturday convention.

FitzSimmons, long a Republican operative and activist in the most conservative circles, entered the Saturday fight with support from Republican state heavyweights, including House Minority Leader Kurt Daudt, gubernatorial candidates Kurt Zellers, Scott ­Honour and ­others. But he lacked support from the Albertville area activists who made the party’s endorsement decision.

Meanwhile, across the Twin Cities, Republican Rep. Pat Garofalo, R-Farmington, was endorsed by his local activists for re-election. Like FitzSimmons, he was one of the few Republican lawmakers to vote to legalize same-sex marriage last year. Unlike FitzSimmons, his endorsement was not threatened.

A majority of voters in ­Farmington, like those in Albertville, had voted in favor of a 2012 constitutional amendment that would have banned same-sex marriage.

Also in the southern suburbs, Republican Mary Liz ­Holberg of Lakeville announced that she would not run for a ninth term. First elected in 1998, Holberg rose to lead the powerful Ways and Means Committee when Republicans held the House.

Holberg championed Republican House members on issues of fiscal restraint and, in recent years, led a sometimes-bipartisan effort to protect Minnesotans’ privacy. Upon the news of her retirement, Republicans and Democrats went to social media to express admiration for Holberg and her work.

She won her 2012 re-election with 59 percent of the vote in heavily Republican-dominated Lakeville.

“She is one of the most respected members of the House,” Minority Leader Kurt Daudt said on Twitter Saturday.

On Saturday, Daudt, R-Crown, had his own battle to fight. He faced — and quickly fended off — an endorsement challenge from Oak Grove Mayor Mark Korin in his district. Daudt won his local activists’ backing for his re-election bid.

Daudt had said last week that he expected to win endorsement.

“But you can’t take anything for granted,” he added.