Appearing hours after the caucuses had ended, Matt Strawn said Romney had 30,015 votes, to 30,007 for Santorum, whose late surge carried him to a near win.
"Game on," declared Santorum, jaw set, after easily outdistancing several other contenders to emerge as Romney's unvarnished conservative rival for the primaries yet ahead.
Romney looked past his GOP rivals and took aim at Obama. "The gap between his promises four years ago and his performance is as great as anything I've ever seen in my life," he told supporters in Iowa's capital city.
The narrow margin, out of more than 122,000 straw poll ballots cast, was a fitting conclusion to a race as jumbled as any since Iowa gained the lead-off position in presidential campaigns four decades ago.
Texas Rep. Ron Paul ran third and former House Speaker Newt Gingrich was fourth. Both men vowed to carry the fight to New Hampshire's primary next week and beyond.
Not so Texas Gov. Rick Perry, who came in fifth and told supporters he would return home to reassess his candidacy.
Minnesota Rep. Michele Bachmann was a distant sixth, and her campaign appeared in disarray. She told reporters she would carry on -- less than an hour after her campaign manager raised doubts in an Associated Press interview about whether she would stay in the race.
Romney is heavily favored in New Hampshire's first-in-the-nation primary on Jan. 10. South Carolina on Jan. 21 figures to be a tougher test, the first contest in the South and a state that is part of the Republican political base.
Already, the top two finishers in Iowa were staking out their turf.
Officials said Romney would receive an endorsement in the morning from Sen. John McCain of Arizona, who twice won the New Hampshire primary and was the GOP presidential nominee in 2008.
Santorum said that was to be expected, and jabbed at his rival. "John is a more moderate member of the Republican team, and I think he fits in with Mitt's view of the world," he said.
Returns from 1,772 of 1,774 precincts showed both Santorum and Romney with 24.5 percent and Paul with 21.5. Santorum had 29,944 votes, Romney had 29,926 and Paul 26,163.
Gingrich had 13 percent, followed by Perry at 10 percent and Bachmann with 5 percent.
No matter how close the final results in Iowa, there were no plans for a recount.
Doug Heye, a spokesman for the state party, said the ballots were counted under the supervision of campaign representatives who certified the totals. He said the numbers were double-checked when they were reported to state officials and there was no reason to check them again.
"On to New Hampshire," Gingrich said to the cheers of his supporters, vowing to carry on his campaign no matter the Iowa outcome.
The former speaker led in the pre-caucus polls as recently as a few weeks ago, only to fall under the weight of attack ads run by a super PAC run by allies of Romney.
Paul, too, said he was looking forward to the nation's first primary in a week's time, telling supporters his was one of two campaigns with the resources to do the distance. "There's going to be an election up in New Hampshire, and believe me this momentum is going to continue and this movement is going to continue and we are going to keep scoring," he told supporters.
The Texas lawmaker didn't say so, but the other campaign already built for a long campaign was Romney's. The former Massachusetts governor was closeted with aides and his family as he sweated out the caucus count in a state that humbled him four years ago.
This time, win or lose, he appeared destined to draw a smaller share of the vote than the 25.2 percent he did then.
Each of the three in the top tier strove to create a distinct identity and brought a different style to the race.
Santorum, the former Pennsylvania senator, ran the old-fashioned way, spending parts or all of 250 days campaigning in the state in hopes of emerging as the preferred conservative alternative to Romney.
Romney, the former Massachusetts governor, brought organization and money to the table, and was aided by deep-pocketed allies who ran television commercials attacking former House Speaker Newt Gingrich and others. That allowed Romney to take the high road in person, running as a former businessman who knew how to create jobs and defeat Obama.
Paul, the Texas congressman, was something of a blend of the two approaches, with money and organization. He drew on the support of younger caucus-goers with a libertarian-leaning approach that included a call to legalize marijuana and bring home U.S. troops from overseas.
Whichever among the three eventually finished ahead, it appeared likely the winner's share of the vote would be a record low for GOP caucuses in the state. Former Sen. Bob Dole had 26.3 percent support in 1996, when he won.
This time, the economy and the federal budget deficit were top issues, judged more important than abortion or health care, according to a survey of early caucus-goers.
Nearly a third of those surveyed said they most wanted a candidate who could defeat Obama, and those favored Romney as a group. Paul and Santorum split the votes of the one in four who called the selection of a true conservative their top priority, and the former Pennsylvania senator also made a strong showing among those who said their top priority was a candidate with a strong moral character as well as among late deciders.
Paul had an edge among younger and first-time caucus goers.
The survey by Edison Media Research for The Associated Press and television networks was based on interviews with 1,737 people arriving at 40 precinct caucuses across the state.
Obama was unopposed for the Democratic nomination. Even so, his re-election campaign set up eight offices across Iowa, made hundreds of thousands of calls to voters and arranged a video conference with caucus night supporters.
"This time out is going to be in some ways more important than the first time," the president told Democrats across the state. "Change is never easy."
The Iowa caucuses' outsized importance was underscored by the estimated $13 million in television advertising by the candidates and so-called super PACs as well as thousands of campaign stops designed to sway 100,000 or so voters.
Ironically, the weak economy that has made Obama appear vulnerable nationally was muted as an issue here. Despite areas of economic distress, the farm economy is strong. Iowa's unemployment in November was 5.7 percent, sixth lowest in the country and well below the national reading of 8.6 percent.
Despite its importance as the lead-off state, Iowa has a decidedly uneven record when it comes to predicting national winners. It sent Obama on his way in 2008, but eventual Republican nominee John McCain finished a distant fourth here to former Arkansas Gov. Mike Huckabee.
Even before Tuesday night's results were known, this year's Republican hopefuls were turning their attention to the next contests. Romney's campaign purchased time to run television ads in Florida, where balloting is three weeks distant, while Perry put down money in South Carolina.
Aides said the Gingrich campaign had purchased a full-page newspaper ad in New Hampshire for Wednesday morning calling Romney a "Timid Massachusetts Moderate."
Romney, who finished second in Iowa in 2008 despite a costly effort, initially campaigned cautiously this time around.
But he barnstormed extensively across the state in the race's final days in pursuit of a first-place finish, running as a conservative businessman with the skills to fix the economy and as the challenger with the best chance to defeat Obama.
Santorum, Gingrich, Perry and Bachmann argued that Romney wasn't nearly conservative enough on the economy and social issues such as abortion. They vied for months to emerge as the alternative to the former Massachusetts governor.
Paul's libertarian-leaning views set him apart, and he hoped that might be enough to claim victory in a six-way race where no one broke away from the pack.
Unlike in a primary, in which voting occurs over hours, the 809 Iowa caucuses were meetings in which Republicans gathered for an evening of politics. Each presidential candidate was entitled to have a supporter deliver a speech on his or her behalf before straw ballots were taken.
Under party rules, caucus results have no control over the allocation of Iowa's 25 delegates to the Republican National Convention. The Associated Press uses the caucus outcome to calculate the number each candidate would win if his support remained unchanged in the pre-convention months.
The race in Iowa came to be defined by its unpredictability as the months rolled by and nationally televised candidate debates piled up.
Bachmann gained early momentum on the strength of a victory in a summertime straw poll and a feisty debate performance.
But she quickly faltered when Perry joined the race and overshadowed her as the 10-year governor of Texas with deep-pocketed supporters and an unbroken record of electoral success at home.
Perry's rise lasted only as long as a couple of debates including one where he memorably was unable to recall the third of three federal agencies he wanted to abolish.
Next up was Herman Cain, a black former businessman who improbably shot to the top of the polls in a party that draws its support chiefly from white voters. He suspended his candidacy a few weeks later, after a woman said she and he had carried on a long-term extra-marital affair.
Gingrich rode the next surge in the polls, a remarkable comeback for a man whose campaign had imploded earlier in 2011 when most of his aides quit in frustration. But his rise lasted only until a super PAC that supports Romney began attacking him on television.
Democrats watched carefully in a state that has swung between the two parties in recent presidential elections.
It was Iowa that launched Obama on the way to the White House four years ago when he won a convincing victory in the caucuses.
David Espo reported from Washington.