By spending a lot of time in Iowa, aides said, Mr. Santorum gained an encyclopedic knowledge of the state’s political flavor. In lieu of scripted presentations and market-tested messages, Mr. Santorum’s preparation on the stump rarely amounted to more than having Chuck Laudner, a top aide to Representative Steve King of Iowa, described by Republican insiders as a “secret weapon,” literally in the driver’s seat briefing the candidate on the issues he would confront at his next appearance.

“In a sense, his focus group was what he saw in front of him at all of his events,” Mr. Brabender said. About eight months ago, the campaign decided to switch from a stump speech to a town-meeting format at Mr. Santorum’s events.

“He saw that when people asked questions, he was able to connect better,” Mr. Brabender said.

That also allowed the campaign to gauge what was effective with Iowa voters and what their concerns were. Mr. Santorum learned, for instance, that many parents who home-schooled their children were eager to share their experiences with the former senator, who with his wife, Karen, home-schooled some of their seven children. It showed him that his fierce opposition to late-term abortions in the Senate remained a resonant issue today with Iowans.

He also emphasized his leading role in the welfare overhaul of the 1990s and his current hard line against the threat of a nuclear-armed Iran after hearing the audience response.

“One of the things we could tell about the crowds was that no one really thought he had a chance, so that kept the numbers down for a while,” Mr. Laudner said. Mr. Santorum would become openly frustrated when it seemed that every other Republican candidate would enjoy a surge except him. “When’s my bump coming?” he asked Mr. Laudner early last month.

Mr. Laudner replied that when he started to move a little bit, the effect would snowball; if he got to about 10 percent in the polls, “the 1 would be replaced by a 2 very quickly,” Mr. Laudner said.