Republican presidential candidate Mitt Romney squeaked out a victory in Iowa's first-in-the-nation nominating contest on Tuesday as little-known rival Rick Santorum rode lingering conservative unease to a surprise second-place finish.
Romney edged out Santorum by only eight votes, winning by 30,015 to 30,007, the state Republican Party announced.
As the Republicans headed for their next contest in Romney stronghold New Hampshire, the result solidified his frontrunner status in the battle to pick a challenger to President Barack Obama in November's election.
At the same time, it underscored Romney's inability so far to secure the trust of his party's conservative wing and consolidate support ahead of what is likely to be the most expensive presidential election campaign in history.
Santorum, a former Pennsylvania senator who until recently has been little more than an afterthought in the race, was the latest candidate to benefit from Romney's weakness, which has allowed a succession of rivals to challenge him.
"Game on!" Santorum declared to cheering supporters as votes trickled in after the agonizingly close contest. "People have asked me how I've done this," he said. "I survived the challenges so far by the daily grace that comes from God."
Santorum and Romney, a former Massachusetts governor who has relentlessly attacked Obama for his "failed presidency" and touted his experience as a businessman, each took 25 percent of the vote. Ron Paul, a Texas congressman, came in third place with 21 percent of the vote.
After the bruising contest, at least one candidate, Texas Governor Rick Perry, indicated his presidential bid may be over.
"I've decided to return to Texas, assess the results of tonight's caucus, determine whether there is a path forward for myself in this race," Perry said after a disappointing fifth place finish.
With deep reserves of cash and a strong campaign infrastructure, Romney will emerge from Iowa in a stronger position than his rivals.
A favorite of the party's business wing, Romney holds a commanding lead in next Tuesday's New Hampshire primary and has the resources to compete in bigger states like Florida at the end of the month. A Republican official said Senator John McCain, the party's 2008 nominee, will endorse Romney on Wednesday.
"This has been a great victory for him," Romney said of Santorum. "We also feel it's been a great victory for us."
Romney fares better than other Republican candidates in head-to-head matchups against Obama, but he has been unable to crack 25 percent in national opinion polls of Republicans. His share of the vote on Tuesday matched the 25 percent he won in 2008 in a disappointing second-place finish.
Santorum vaulted from the back of the pack to emerge as the latest conservative favorite in a race marked by volatility. Campaigning in all Iowa's 99 counties, he emphasized his home-schooled children and opposition to gay marriage in a bid to win the state's large bloc of Christian conservatives.
Santorum staked his campaign on a strong showing in Iowa but with little cash and a bare-bones campaign operation he could have difficulty competing in other states.
Santorum so far has avoided the scrutiny that has derailed other candidates. Though he touts his ability to sell conservative ideas to Democrats and independents, Pennsylvania voters threw him out of office by an 18-point margin in 2006.
Rivals have begun to comb through his legislative record to paint him as a free-spending budget-buster.
Iowa is better known for narrowing the field than picking the eventual nominee. Conventional wisdom holds that there are three tickets out of the state, though McCain was able to overcome a fourth-place finish in 2008 conventional wisdom holds that Paul's unorthodox views, including supporting a return to the gold standard and an end to a U.S. overseas military presence, have won him a passionate following among voters who feel deeply alienated from more mainstream candidates. He will have an uphill climb translating that into wider support among Republicans.
"Protecting your personal rights and your economic rights are what the government's supposed to do, they're not supposed to run our lives or spend our money," he told supporters.
Most of the candidates have topped opinion polls at some point and many voters said they were undecided even as the caucuses got under way.
Voters gathered in schools, churches and other venues around on a cold evening in the midwestern state, listening to supporters tout the various candidates before casting their ballots. Democrats and independents were allowed to participate as long as they re-registered as Republicans at the site.
Outside groups associated with candidates, known as "Super PACs," took advantage of loosened campaign-finance rules to flood the Iowa airwaves with negative advertising.
Former House of Representatives Speaker Newt Gingrich saw his support dwindle under a barrage of attack advertisements, many from a Super PAC run by Romney allies. He finished in fourth place.
Despite the negative onslaught, "everywhere we went people were positive," Gingrich told supporters. "They really wanted to get to the truth rather than the latest 30 second distortion."
Another candidate, U.S. Representative Michele Bachmann, fared worse. The lawmaker from neighboring Minnesota has lost momentum since topping an informal tally in August. She finished in sixth place with 5 percent of the vote but vowed to press on.
Sparsely populated Iowa only yields 25 delegates of the 1,143 needed to lock up the Republican presidential nomination, and those delegates aren't actually awarded for months after Tuesday's caucuses.
About 120,000 participated in Tuesday's Republican vote, and another 25,000 participated in the Democratic caucus -- about 8 percent of the state's eligible voters.
Still, the state is likely to play an outsize role in U.S. politics through to the November 6 election.
While Republican candidates have dominated the headlines, Obama's Democrats have quietly built a massive organization to round up voters in the fall.
Obama told Iowa supporters in a video chat on Tuesday evening that he would need the same energy and enthusiasm that helped him win the caucus four years ago, vaulting him into the lead for the Democratic nomination.
"It's going to be a big battle," he said.