In the Democratic race, the Iowa party chair released at statement saying "the results tonight are the closest in Iowa Democratic caucus history." Clinton was awarded 699.57 state delgate equivalents, and Sanders 695.49 with one precinct outstanding.

Democratic caucus-goers were choosing between Clinton's pledge to use her wealth of experience in government to bring about steady progress on Democratic ideals and Sanders' call for radical change in what he described as a system rigged against ordinary Americans.

Clinton, the former secretary of state, U.S. senator and first lady, entered the Democratic race as the heavily favored front-runner. Clinton was seeking to overcome the ghosts of her loss to Obama in 2008. Her campaign spent nearly a year building a massive get-out-the-vote operation in Iowa.

Yet she faced an unexpectedly strong challenge from Sanders, the self-declared democratic socialist from Vermont.

On Monday night, Clinton appeared before voters to declare she was "breathing a big sigh of relief." But she stopped short of claiming victory and declared herself ready to press forward in "a real contest of ideas."

Sanders had hoped to replicate Obama's pathway to the presidency by using a victory in Iowa to catapult his passion and ideals deep into the primaries.

“I think the people of Iowa have sent a very profound message to the political establishment, to the economic establishment, and by the way, to the media establishment,” Sanders said. “That is, given the enormous crises facing our country, it is just too late for establishment politics and establishment economics.”

Despite his strong showing, Sanders still faces an uphill battle against Clinton, who has deep ties throughout the party's establishment and a strong following among a more diverse electorate that plays a larger role in primary contests in February and March.

Even before the caucuses began, Sanders was working to discount the importance of any Clinton edge coming out of Iowa, telling reporters that if the former secretary of state "ends up with two delegates more of many, many hundred delegates, you tell me why that's the end of the world."

He served notice: "We're taking this all of the way."

The knife-edge results in Iowa mean the Democratic vote in New Hampshire takes on even greater import because a win in Iowa represents crucial early momentum in any presidential campaign, and for some candidates, the future of their White House hopes altogether.

Former Maryland Gov. Martin O'Malley's dropped out of the race even before a winner had been declared but as early results showed O'Malley garnering negligible support in the first primary contest. He was awarded 7.68 state delegate equivalents.

On the Republican side, former Arkansas Governor Mike Huckabee said he was suspending his campaign for the Republican party nomination. Huckabee won the Iowa caucus in 2008.

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

In Iowa, which has for decades launched the presidential nominating contest, candidates also faced an electorate that's whiter, more rural and more evangelical than many states. But, given its prime leadoff spot in the primary season, the state gets extra attention from presidential campaigns.

Even so, Iowa has decidedly mixed results in picking eventual nominees. The past two Republican caucus winners — Huckabee and former Pennsylvania Sen. Rick Santorum — faded as the race stretched on. But Obama's unexpected 2008 victory was instrumental in his path to the Democratic nomination, easing the anxieties of those who worried the young black senator would struggle to win white voters.

Monday's contest was the first hard evidence of whether Trump could turn the legion of fans drawn to his plainspoken populism into voters. "I think a lot of things caught up to him here in the last couple of weeks," said Trump supporter Brett Ridge of Des Moines, speaking shortly after Trump's concession speech. "When it comes down to it, he should have been at the debate last week."

Cruz modeled his campaign after past Iowa winners, visiting all of the state's 99 counties and courting influential evangelical and conservative leaders.

Cruz spent the closing days of the Iowa campaign focused intensely on Rubio, trying to make sure the Florida senator didn't inch into second place. Rubio is viewed by many Republicans as a more mainstream alternative to Trump and Cruz.