People raise their hands to ask questions of Republican presidential candidate Sen. Ted Cruz, R-Texas, as he speaks at a town hall meeting in Salem, N.H., on Friday. (Jacquelyn Martin/AP)

Sen. Ted Cruz stood on a step stool in a bar here, framed Boston sports photos to his left and a guy drinking a bottle of beer to his right, and went on and on about the intricacies of political strategy.

“How is the general [election] going to play out? Let me answer it in two ways,” Cruz said, launching into an answer about how political consultants advise candidates to run to the “mushy middle” and how various voter blocs didn’t cast ballots in the past few elections.

More than any other candidate in the Republican field, Cruz is at his heart a strategist. He becomes animated when he talks about the electoral calendar. He is comfortable down in the weeds of arcane electoral strategy. He waxes poetic on nitty-gritty voter data.

Cruz’s campaign is built around a sophisticated data and analytics system that his team is happy to break down. Before last week’s Iowa caucuses, for instance, his campaign manager laid out how the campaign would win in pinpointed numerical detail. (He was nearly right — but for the fact that turnout of Cruz supporters was even higher than predicted.)

Republican presidential candidate Ted Cruz speaks to media in Weare, N.H., last week. (Elise Amendola/AP)

The focus is an extension of the candidate himself.

“I’m a data guy, a numbers guy,” Cruz often tells crowds. And then he delves into statistics.

“There are about 90 million evangelicals in America. Fifty-four million evangelicals stayed home in 2012,” he said here, explaining how he is attempting to appeal to religious voters.

Typically the job of explaining strategy is left to campaign aides — if they are allowed to speak about it at all. There are exceptions: Bill Clinton loved the machinery of campaigns, and he could discuss their intricacies like a political consultant.

Cruz does the same, laying out his campaign blueprint and philosophy in wonky detail to reporters and delving into it on the campaign trail. It’s a lesson in what happens when a policy wonk is the candidate.

The habit also has served a strategic purpose for Cruz — particularly when he was still establishing himself as a formidable contender for the Republican nomination. Cruz wanted to signal to the world not only what he stood for as a conservative Christian — but that he had the campaign structure and smarts to actually win. In past Republican primaries, that’s been an unusual concept for evangelical candidates, whose campaigns have typically fizzled after strong wins in Iowa because neither the strategy nor the money were in place to sustain the operation.

Cruz has both.

“I can’t guarantee we’ll win. I don’t know that. That’s out of my hands. I believe we have a path to victory, Cruz told a private meeting of pastors in Cedar Rapids, Iowa, days before winning the caucuses. “I believe we put the team in place. I believe we have a winning strategy,”

Cruz is a lawyer by training and often speaks like one on the trail, laying out answers like they are arguments in a court case.

“I’ve got many personal faults, but, as a former Supreme Court litigator, failing to plan is not one of them,” Cruz said in his book, “A Time for Truth.”

He sometimes gives granular readings of the Constitution. He thinks in arguments and builds their foundation brick by brick. He likes to play chess and poker. And his campaign has had its plan ready since day one — running a national campaign as a religious conservative focused on the very long game of winning delegates.

Cruz is often thinking “not just one and two, but three, four, five, six, seven and eight steps ahead … he plays that role often,” said Jason Johnson, a Cruz campaign strategist.

And he has been that way for a very long time.

“He’s all about the blueprint,” said David Panton, Cruz’s best friend and debate partner at Princeton University. “Ted has always been extraordinarily strategic, highly focused and very structured.”

In college, Cruz was “always very focused on the planning” before a debate competition, scouting out the biggest competitors and attempting to identify their strategy, Panton said. Cruz would pour through ballots that the two men got back from debate judges after competitions in order to find out what the team did right or wrong and how they could improve.

“He honed his speaking skills in response to what the judges told us,” Panton said.

Cruz also regularly discusses how he and his campaign divided the electorate into lanes: conservative, evangelical, libertarian and moderate.

“Historically, conservatives have outnumbered moderates in the Republican Party two to one,” Cruz told National Review last month. “Seventy-seven percent of Republican primary voters identify as conservative, 52 percent as very conservative. If we go head to head, one strong conservative versus one strong moderate, it’s game over.”

As he told The Washington Post in October: “The moderate lane is unbelievably crowded.”

Cruz’s campaign is modeled after a surprising one: President Obama’s 2008 contest. When Cruz was running for the Senate in 2012, which deployed similar tactics to his presidential campaign, he made his staff read “The Audacity to Win: The Inside Story and Lessons of Barack Obama’s Historic Victory” by David Plouffe, Obama’s 2008 campaign manager.

The Texas Republican uses sophisticated analytics to identify potential supporters, a 2016 version of Obama’s 2008 data-driven campaign. The candidate uses the data not just to target voters but to assess strengths, weaknesses, turnout, the electorate and how to connect to them through messaging.

And it should be no surprise.

“I’m a data guy,” he told the crowd here.