Former Massachusetts governor Mitt Romney beat former senator Rick Santor­um (Pa.) in the Iowa caucuses by just eight votes, a sign of a splintered and increasingly fractious field as the GOP presidential race moves to New Hampshire, South Carolina and Florida.

Rep. Ron Paul (Tex.) scored a close but disappointing third-place finish in a state where he had hoped to score a breakout victory. But he told his supporters “there’s nothing to be ashamed of” and urged them to “be ready and raring to move on to the next stop.”

Further back in the pack were three candidates who had been considered leading contenders at earlier points in the race: former House speaker Newt Gingrich (Ga.), with 13 percent of the vote, and Texas Gov. Rick Perry, with 10 percent. Putting in a particularly dismal showing was Rep. Michele Bachmann (Minn.), with 5 percent.

Earlier in the day, Perry had vowed to continue on to South Carolina and take the fight to Romney. But on Tuesday night, the governor said he planned to go home to Texas instead and “determine whether there is a path forward for myself in this race.”

It is more difficult to see such a path for Bachmann, given her last-place finish and the fact that her campaign strategy had been premised on a strong launch in Iowa, the state where she was born and where she won the GOP straw poll in Ames in August.

But her campaign manager, Keith Nahigian, said Bachmann is going ahead “full steam.”

Gingrich, meanwhile, sounded a note of determination. “There will be a great debate in the Republican Party before we are prepared to have a great debate with Barack Obama,” he said as the final results were coming in.

Though Santorum’s old-fashioned, shoe-leather approach to campaigning paid off in Iowa, the question now is how far he can go from here, given his lack of resources and the need to ramp up a national organization.

In his victory speech, San­torum alluded to concerns that he was not up to a contest with Romney. “Let me tell you what wins in America are bold ideas, sharp contrasts and a plan that includes everyone,” Santorum said.

Santorum also will come under the kind of scrutiny and criticism that he was spared when the other contenders did not view him as a threat.

Paul, for instance, has already branded Santorum “very liberal,” and Perry has described the former senator as “addicted to earmarks.”

For his part, Santorum has said Paul is “disgusting,” and he blamed Paul’s campaign for automated phone calls in which voters were told that the vehemently antiabortion Santorum was, instead, more supportive of abortion rights.

Though Romney’s Iowa vote percentage was almost precisely what he got in 2008, the fragmentation of the field meant that he was spared the kind of defeat he suffered four years ago. This time, he had made a far more modest effort in the state. As he noted Tuesday night, his Iowa staff of five was less than one-tenth the size of his operation in 2008.

And both Paul, a libertarian whose views are out of line with those of most Republicans, and Santorum, an underfinanced social conservative, will struggle to prevail against Romney in the long run.

But the results also point to the fact that the Republican base remains deeply dissatisfied with Romney, whose moderate record has engendered mistrust among conservatives.

They appear unconvinced by Romney’s argument that he is the most electable of the candidates, and that his record as a business executive and corporate turnaround artist would be the ideal contrast against a vulnerable incumbent president whose chief liability is an ailing economy.

On Tuesday night, it was evident that Romney was looking beyond Iowa to New Hampshire and its more moderate electorate — and even beyond, to the general election. He kept his criticism trained on Obama. “We’re going to change the White House and get America back on track,” he said.

But it appears that for the first time in this campaign, Romney is about to come under intense attack by his opponents, which could further roil — and prolong — the race.

Gingrich, whose political career has been defined by a take-no-prisoners approach to his adversaries, has until recently refrained from criticizing the front-runner. But over the past few days, he has taken a sharply negative tone — one that he appears certain to amplify as the contest moves forward. In an interview Tuesday on CBS, he called Romney “a liar.”

His campaign has bought a full-page ad in Wednesday’s Manchester, N.H, Union-Leader headlined “The Choice.” It describes the former speaker as a “Bold Reagan Conservative,” and Romney as a “Timid Massachusetts Moderate.” New Hampshire holds its primary on Tuesday.

“We are not going to go out and run nasty ads, but I do reserve the right to tell the truth. And if the truth seems negative, that may be more a comment on his record than it is on politics,” Gingrich said Tuesday. “Do we want a Massachusetts moderate who in fact would be pretty good at managing the decay and has given no evidence in his years in Massachusetts of any ability to change the culture or change the political structure?”

Also influencing the shape of the race will be spending by the outside organizations known as “super PACs.” They are legally required to operate separately from the campaigns but in fact are run by close allies of the candidates.

For all the attention the Iowa caucuses receive as the first contest of the nominating season, they have been an unreliable predictor of which GOP candidate will ultimately receive the nomination in races where there is not an incumbent president.

Since the caucuses first rose to prominence in the 1970s, only two winners — Sen. Robert J. Dole in 1996 and Texas Gov. George W. Bush — have gone on to become their party’s standard-bearers.

Past Iowa contests have, however, cleared the field of its weaker performers.

That now appears likely to be the case with Perry, who entered with great fanfare in August, quickly rising to the top of the polls and raising millions.

Perry proved to be a disaster in debates, however, in a year when those nationally televised forums played an outsized role in the primary race. He never recovered from one particularly embarrassing moment when he was able to remember the names of only two of the three government departments that he planned to eliminate.

The word he uttered at that moment — “oops” — quickly became a punch line that defined him.

The three candidates in the top tier have distinct constituencies, ones that echo broader divisions within the GOP.

Caucus-night polling suggests that Romney was the strongest performer among voters whose top priority is beating President Obama.

According to preliminary num­bers, he won nearly half of all such voters, more than double the number selecting any other candidate.

Romney also fared relatively well among moderates and liberals, even as he slipped among the most conservative caucus-goers compared with his performance four years ago.

Caucus-goers who described themselves as “very conservative” broke for Santorum, according to the polling. The former senator also emerged as the newest darling of the tea party political movement, picking up 30 percent of strong tea party backers, with four other candidates in the teens.

The senator surged in the closing days of the campaign and won a plurality among those saying they made their final decision on Tuesday.

Paul, who won only one Iowa county in 2008, was buoyed by strong support among younger voters and independents, with both groups making up a larger share of caucus-goers than they did four years ago.

Polling director Jon Cohen in Washington and staff writers Amy Gardner, Rosalind S. Helderman, Nia-Malika Henderson and Philip Rucker in Iowa contributed to this report.