SMITHFIELD, N.C. (AP) — At eastern North Carolina's premier election-season barbecue, Republicans revved up thousands of conservatives before U.S. Senate candidate Thom Tillis took the stage by reminding them the state's gay marriage ban they approved two years ago has been struck down.

By an out-of-state judge backed by President Barack Obama, no less.

"I don't believe some Obama-appointed unelected judge up in Virginia gets to tell us what marriage is!" yelled North Carolina state Sen. Buck Newton into the microphone, eliciting cheers inside a tobacco warehouse in Smithfield, just southeast of Raleigh, during the Oct. 24 event.

He was referring to a February ruling striking down Virginia's constitutional amendment, starting a chain of legal events that led to North Carolina's amendment being overturned three weeks ago by an in-state federal judge.

"If you believe like I do," Newton told the crowd, then "you need to go the polls and make sure we fix these problems."

Tillis never mentioned gay marriage in his speech that night. But no candidate may have more to gain or lose politically from the recent rapid expansion of gay marriage than he does in his tight race with Democratic Sen. Kay Hagan.

The state House speaker endeared himself to social conservatives when he helped get on the ballot the constitutional referendum to prohibit gay marriage that was approved by May 2012 voters. Now he's refused to give up on the ban even when the state's attorney general stopped defending it. Tillis and his state Senate counterpart have hired an outside attorney at taxpayer expense for a long-shot fight to preserve the amendment.

"I have an obligation, a sworn obligation to defend the laws of North Carolina," Tillis told reporters recently.

Tillis' last-ditch efforts galvanized otherwise discouraged gay marriage opponents in the final weeks of a close, expensive race that ends Tuesday on Election Day.

But they also could alienate independent voters or young people disinterested in social issues or supportive of gay rights as public acceptance of same-sex unions increase dramatically.

At the very least, some Republicans angry with the rulings say they're more energized to get others to the polls. They acknowledge that they can't get rid of lifetime federal judges but can send a message to prevent likeminded ones from reaching the bench.

"We want to get these judges out and want to get these senators out," Donna Annis, 60, of Clayton said after the rally. "We very obviously voted that we did not want gay marriage, and so (when) one judge says, 'well, too bad'... we don't want those people anymore."

Gay-rights groups invigorated by their new North Carolina victory say Tillis' action is putting him on the wrong side of history and will backfire. "Thom Tillis isn't going to win moderate voters" with his actions, said Chris Sgro, executive director of Equality North Carolina, who used to work for Hagan.

Hagan, who opposed the amendment and supports gay marriage, said last week in a statement Tillis "is now using taxpayer money to argue a case that he knows he is going to lose."

Tillis' actions, however, could play well with people unhappy with courts canceling the decisions of voters.

The latest Associated Press-GfK national poll has 56 percent of likely voters saying it was inappropriate for the federal courts to issue rulings that overturn state same-sex marriage laws. And while the Elon University Poll in September found more likely voters supporting gay marriage than opposing it, a new Elon poll performed after the North Carolina amendment was struck down found 50 percent opposing gay marriage and 38 percent supporting it.

While Equality NC's political arm has distributed 15,000 voter guides that highlight its strong Hagan support and operating a nightly phone bank, social conservatives are marshalling larger ground forces.

The national Faith & Freedom Coalition said it plans to distribute close to a half-million voter guides that say clearly Tillis opposed gay marriage while Hagan supported it. Most were given to about 800 churches statewide. About 100,000 guides are being distributed door-to-door, coalition state director Evelyn Murray said.

The race "could come down to less than 10,000 votes," coalition executive director Tim Head said. "It's not unbelievable to think 5,000 or 10,000 could be animated on this issue."

The National Organization for Marriage and N.C. Values Coalition have formed a super PAC to air a television ad that reminds voters U.S. District Judge Max Cogburn of Asheville, who on Oct. 10 formally struck down the North Carolina ban, was nominated to the bench by Obama on Hagan's recommendation.

"Thom Tillis is fighting for marriage," the narrator says. "Kay Hagan and her judge betrayed us."

The ad buy is small — a monetary value in the low six-figures in a state where the two candidates and outside groups spend more than $92 million. And Coburn was hardly a controversial choice — he was confirmed 96-0 by the Senate.

Tillis' volume on the gay marriage issue has been muted at times. He's quickly changed the topic when asked about it during general election debates with Hagan. Weeks before the May 2012 referendum, Tillis predicted to a college audience that the amendment would be "repealed within 20 years" because young people are more supportive of legalizing gay marriage. It was repealed in 29 months.