Texas Senator Ted Cruz, a fiery conservative loathed by his own party's leaders, swept to victory in Iowa's Republican caucuses Monday, overcoming billionaire Donald Trump and a stronger-than-expected showing by Florida Senator Marco Rubio. Among Democrats, Bernie Sanders rode a wave of voter enthusiasm to a virtual tie with Hillary Clinton, long considered her party's front-runner.

Cruz's victory over Trump was a testament to his massive get-out-the-vote operation in Iowa and the months he spent wooing the state's influential conservative and evangelical leaders.

Trump, who in the past has boasted about being a winner and claimed that second place doesn't matter, instead pointed out the great strides his campaign has made despite the conventional wisdom a year ago that he wasn't a serious candidate.

"I was told by everyone [in June], do not go to Iowa, you could never even finish in the top 10," Trump said at a rally in Des Moines after the results come in.

Trump said he was honoured to finish second in Iowa, and he congratulated Cruz on his win without hesitation, a far cry from his hounding in recent weeks regarding whether the Calgary-born Cruz was eligible to serve as president.

The Republican candidate was graceful in coming second behind Ted Cruz in the Iowa 3:19

Cruz came in with just under 28 per cent support, with Trump just over 24 per cent and Rubio around 23 per cent.

"Iowa has sent notice that the Republican nominee and the next president of the United States will not be chosen by the media [and] will not be chosen by the Washington establishment," said Cruz.

Republicans voted by private ballot. The state's 30 Republican delegates are awarded proportionally based on the vote, with eight going to Cruz and seven each to Trump and Rubio. Coming next was Ben Carson with three, followed by Rand Paul and Jeb Bush with one each.

Cruz, a first-term Texas senator, now heads to next week's New Hampshire primary as an undisputed favourite of the furthest right voters, a position of strength for drawing in evangelical voters and others who prioritize an abrupt break with President Barack Obama's policies.

Republican presidential candidate, Florida Senator Marco Rubio addresses supporters at a caucus night party after a strong third place showing in Iowa. (Pete Marovich/Getty Images)

Perhaps most importantly, Cruz's win denied Trump a huge opportunity to gain momentum heading into New Hampshire. Trump parlayed his fame as a real estate mogul and reality television star into large rallies and national poll numbers that before Monday night had established him as the Republican front-runner.

Rubio cemented his status as the favourite of mainstream Republican voters who worry that Cruz and Trump are too caustic to win the November general election.

Unsurprisingly, he cast his stronger-than-expected finish as a victory.

"We have taken the first step, but an important step, to winning the nomination," Rubio said.

The Iowa caucuses kicked off voting in the 2016 presidential race, a tumultuous contest with unexpected candidates challenging both the Republican and Democratic establishments.

Clinton in another Iowa fight

Iowa Democratic party chairman Andy McGuire said the results were the closest in state caucus history.

With all precincts reporting, Clinton finished with 49.8 per cent of the vote, while Sanders earned 49.6 per cent.

The Des Moines Register said Clinton finished with 699.57 delegate equivalents while Sanders finished with 697.77.

The delegate counts in this precinct for the Democrats end up as follows: <a href="https://t.co/i3vXV728XH">pic.twitter.com/i3vXV728XH</a> —@matt_kwong

Democrats form groups at caucus sites, publicly declaring their support for a candidate. The final numbers are awarded proportionately, based on statewide and congressional district voting, determining Iowa's 44 delegates to the national convention.

Former President Bill Clinton, left, and Democratic presidential candidate Hillary Clinton acknowledge supporters during a caucus night rally at Drake University in Des Moines. (Patrick Semansky/Associated Press)

Clinton, the former secretary of state, U.S. senator and first lady, had been expected to cruise to victory in Iowa and beyond. But Sanders has appealed to the Democrats' liberal base, especially the young, who are concerned about growing income inequality and the shrinking of the middle class.

Although Clinton said she was "breathing a big sigh of relief," and her campaign said it had won an outright victory, the neck-and-neck contest was a blow, evoking the setback she faced in 2008 after her upset loss to then-Senator Obama. Given the closeness of the Democratic caucuses, the AP did not declare a winner.

Eight years ago, Clinton's victory in New Hampshire breathed fresh life into her campaign. But New Hampshire is also familiar territory for Sanders, who represents neighbouring Vermont in the Senate and is well known among the state's voters. Sanders' sizable lead over Clinton in New Hampshire polls has held steady or increased in recent weeks.

Statement from IDP Chair <a href="https://twitter.com/DrAndyMc">@DrAndyMc</a> on Tonight’s Historically Close Caucus Results<a href="https://t.co/Aoq71CPabY">https://t.co/Aoq71CPabY</a> —@SamuelRLau

Clinton had a big advantage with voters 65 and over, according to polling data, with Sanders able to boast of an even wider disparity — at over 80 per cent support — from voters 30 and under.

Sanders said his razor-thin contest against Clinton in Iowa is giving his campaign a "kick-start."

The Democratic presidential candidate said it shows the American people that "this is a campaign that can win."

Sanders told reporters travelling aboard his flight to New Hampshire early Tuesday that his message of addressing wealth inequality resonated with voters in Iowa. He predicted it will resonate in the early voting states of New Hampshire, Nevada and South Carolina.

Sanders isn't saying whether he considers anything less than victory in New Hampshire a successful outcome. He said his campaign is in it "for the long haul" and predicts that "we are going to win some states, we are going to lose some states."

U.S. Democratic presidential candidate Bernie Sanders was in a virtual tie for Iowa delegates with establishment favourite Hillary Clinton late Monday night. (Rick Wilking/Reuters)

Trump couldn't resist a parting shot at the Democrats, with a reference to the investigation surrounding Clinton's use of a private server for emails while she served as secretary of state.

"I don't know who's going to win between Bernie and Hillary," said Trump. "I don't know what's going to happen with Hillary, she has other problems, maybe bigger than the problems she's got, in terms of nominations."

Iowa has long led off the state-by-state contests to choose delegates for the parties' national conventions. Historically, a victory has hardly assured the nomination — Iowa accounts for only about one per cent of the delegates who select the nominee. As well, the electorate is whiter, more rural and more evangelical than many states.

But a win there, or even an unexpectedly strong showing, can give a candidate momentum and media attention, while a poor showing can end a candidacy.

Candidates drop out

Candidates in both parties faced an electorate deeply frustrated with Washington. While the economy has improved under Obama, the recovery has eluded many Americans. New terror threats at home and abroad have increased national security concerns.

Voters at Republican caucuses indicated they were deeply unhappy with the way the federal government is working. Half said they were dissatisfied and four in 10 said they were angry, according to surveys conducted by Edison Research for The Associated Press and the television networks.

Alan Nelson, a Bernie Sanders Caucus Chair, speaks to caucusgoers at a Democratic Party Caucus at Jackson Township Fire Station Monday in Keokuk, Iowa. (Michael B. Thomas/AFP/Getty Images)

Six in 10 Democratic caucus-goers wanted a candidate who would continue Obama's policies.

The caucuses marked the end of at least two candidates' White House hopes. Martin O'Malley ended his longshot bid for the Democratic nomination. Former Arkansas Gov. Mike Huckabee dropped out on the Republican side.

Republicans John Kasich, Chris Christie and Bush all spent Monday night in New Hampshire — not only to get a jump on the snow moving into Iowa but also to get ahead of their competitors in a state with voters who are expected to be friendlier to more traditional GOP candidates.