Paul got more votes. (AP Photo/Timothy D. Easley, File)

Sen. Rand Paul (R-Ky.) came out ahead of Sen. Ted Cruz (R-Tex.) in a weekend straw poll of libertarian-leaning Republican activists, but the Texan claimed victory anyway -- the latest gritted-teeth exchange between two candidates brawling for a similar base.

"Liberty unites people, and I am honored to win the Republican Liberty Caucus straw poll," Paul said in a statement. "I will continue to represent the Liberty wing of the Republican Party."

In a separate statement, released moments later, Cruz's campaign claimed a "major upset among libertarian voters" had occurred at a conference in Nashua, New Hampshire. "We are very encouraged by the growing support we are seeing among liberty voters in the early states and across the country,” Cruz said. "If I'm elected president, libertarian voters across the country can be confident that I will continue to stand for the U.S. Constitution at every turn.”

The math was kinder to Paul, who has led Cruz in endorsements from libertarian-leaning New Hampshire Republican legislators since the start of the presidential race. Both men spoke to the Republican Liberty Caucus meeting. Paul won 445 votes to 399 for Cruz, in a preference test that combined votes for first-choice candidates and for anyone that voters found acceptable. (Former neurosurgeon Ben Carson trailed with 139 votes, while former Hewlett-Packard CEO Carly Fiorina ran fourth with 79.)

Behind the scenes, Cruz allies had sown doubts about whether Paul's campaign was still competitive with the sort of "liberty" voters who were inspired to enter politics by his father, former Texas congressman Ron Paul. One rumor had Paul desperately busing in supporters from his home state of Kentucky. Another rumor had staff deserting the campaign as the Cruz juggernaut gathered momentum.

Paul's campaign made no attempt to conceal its pleasure at besting Cruz. "While Ted Cruz worked hard and bussed people in, he ultimately did not resonate with liberty lovers," said Paul spokesman Sergio Gor. "Ted Cruz came, Ted Cruz saw, Ted Cruz was conquered."

Cruz spokesman Rick Tyler said flatly that the campaign had not bussed anyone in to the conference, but confirmed that 25 tickets had been purchased for supporters. The campaign's post-vote statement led with how Cruz had won "51 percent" of the vote, based on the strange combined count. (According to this math, Paul won 57 percent of the vote.) Paul's campaign, which has grappled with weeks of stories about whether the candidate can even make it to the New Hampshire primary, was not so coy.

"One thing it should tell you is who has the better organizational muscle for conventions and caucuses," said Paul strategist Doug Stafford, who had previously laughed off a rumor that he'd abandoned the campaign for a struggling pro-Paul super PAC. "We don't spend all weekend planting stories about winning polls that require organization. We just win them."