US Senator Ted Cruz soundly defeated billionaire Donald Trump in Iowa's Republican nominating contest on Monday, upending the party's presidential race and creating a three-way competition with establishment candidate Senator Marco Rubio.
On the Democratic side, officials said former Secretary of State Hillary Clinton had won by a razor-thin margin against US Senator Bernie Sanders of Vermont, the closest in Iowa Democratic caucus history.
Cruz, a conservative lawmaker from Texas, won the first state Republican contest in the 2016 race with 28 per cent of the vote compared with 24 per cent for businessman Trump. Rubio, a US senator from Florida, came in third with 23 per cent, making a stronger-than-expected finish.
With Democrat Clinton prevailing by only four delegates, according to party figures, Sanders, a self-described democratic socialist, declared the result a "virtual tie."
"Hillary Clinton has won the Iowa Caucus," Matt Paul, the Iowa state director for Clinton said in a statement released in the early hours of Tuesday morning.
Momentum shifts
Cruz's win and Rubio's strong showing could dent the momentum for Trump, whose candidacy has alarmed the Republican establishment and been marked by controversies ranging from his calls to ban Muslims temporarily from entering the United States to promising to build a wall on the US-Mexican border.
"Tonight is a victory for courageous conservatives across Iowa and all across this great nation," Cruz, 45, said during a victory speech lasting more than 30 minutes.
An uncharacteristically humbled Trump, 69, congratulated Cruz and said he still expected to win the Republican nomination. Opinion polls show Trump leading nationally and in New Hampshire, which holds the next nominating contest.
"I'm just honoured," Trump said.
Unusually large crowds poured into schools, churches and other venues for the caucuses, in which voters gather together to select a candidate.
Cruz's well established get-out-the-vote effort helped overcome the enthusiasm from large crowds that have shown up for Trump's rallies. Trump skipped the last Republican debate before the caucus because of a dispute with host FOX News. A Trump adviser said his second-place finish was expected.
Iowa has held the first contest in the country since the early 1970s, giving it extra weight in the electoral process that can translate into momentum for winning candidates.
Rubio, 44, may benefit from that momentum as much as Cruz. The Florida lawmaker established himself as the mainstream alternative to the two front-running rivals.
"Rubio has staying power. He weathered $30 million in negative ads and late deciders broke his way due to his upbeat and optimistic close," said Republican strategist Scott Reed.
Cruz was buoyed by evangelical support and thanked God for his win.
Clinton sighs, Sanders smiles
The results of the Democratic race put pressure on Clinton to siphon support away from Sanders, who has won over politically left-leaning voters with his promises to take on Wall Street and start fresh with healthcare reform.
Clinton, 68, said she was breathing a "big sigh of relief" after the results. She lost Iowa to then-Senator Barack Obama in the 2008 Democratic race and never recovered.
"It is rare that we have the opportunity we do now to have a real contest of ideas," Clinton said with her husband, former President Bill Clinton, and daughter Chelsea joining her on stage.
Sanders, 74, declared himself overwhelmed. The lawmaker, who smiled broadly as he addressed supporters, is leading in New Hampshire, home to next week's second contest, but trails Clinton in other states such as South Carolina, which holds the third contest.
"Nine months ago, we came to this beautiful state, we had no political organization, we had no money, we had no name recognition, and we were taking on the most powerful political organization in the United States of America," Sanders said.
Former Maryland Governor Martin O'Malley, who had trouble gaining any traction in the Democratic race, suspended his campaign after coming in third in Iowa with 0.6 percent.
The 2016 election is shaping up to be the year of angry voters as disgruntled Americans worry about issues such as immigration, terrorism, income inequality and healthcare, fueling the campaigns of Trump, Sanders and Cruz.
Republican establishment candidates more traditional than Rubio did not fare well in Iowa. Former Florida Governor Jeb Bush took 2.8 percent, Ohio Governor John Kasich took 1.9 percent, and New Jersey Governor Chris Christie took 1.8 percent.
Surgeon Ben Carson, an outsider, placed fourth among Republicans with 9 percent while former Arkansas Governor Mike Huckabee said he was suspending his campaign for the party's nomination. Huckabee won the Iowa caucus in 2008.
Market reaction
Market reaction in Asia to the results was muted, with US stock futures down around half a percent.
"Financial markets might be more comfortable with Hillary (Clinton) than Bernie (Sanders)," said Sean Callow, a strategist at Westpac Bank in Australia.
"There would have to be at least some jitters over the guy who plans to break up the big banks. But it's probably too early to expect the US presidential race to have an impact on the US stock market."