WASHINGTON - US Senator Ted Cruz, a conservative from Texas, stunned billionaire businessman Donald Trump to win Iowa's Republican caucuses Monday night as Democratic presidential hopeful Hillary Clinton eked out a victory in a historically close race.

"Tonight we saw a historically close Iowa Democratic Caucus," the party said in a statement shortly in the early hours of the morning.

Cruz's victory over Trump raised questions about his reliance on his celebrity instead of traditional political organization. Senator Marco Rubio, who came third in the Republican caucus marked him as the establishment's best hope against a grassroots revolt in next week's New Hampshire primary and beyond.

Relishing his victory in the first Republican nominating contest of the US presidential election, Senator Cruz called his defeat of Trump a tribute to "conservative grass roots."

Cruz also said the result from Monday's contest was a rebuke to what he called President Barack Obama's liberal agenda and a win for "Judeo-Christian values." "This is the power of the conservative grass roots," the senator from Texas told CNN on Tuesday.

"One of the greatest lies that gets told on the airwaves over and over again is that this country has somehow embraced Barack Obama’s big government. That’s not true. This is a centre-right country. This is a country built on Judeo-Christian values," he said.

Cruz won the Republican Iowa caucuses with 28 percent of the vote compared with 24 percent for businessman Trump, whose aggressive and unorthodox campaign has been marked by controversies ranging from his calls to ban Muslims temporarily from entering the United States to his pledge to build a wall along the US-Mexican border.

Senator Rubio, with 23 percent, made a stronger-than-expected finish and establishing himself as the mainstream Republican alternative to the two front-running rivals in the race to represent the party at the Nov.8 presidential election.

On the Democratic side, former Secretary of State Hillary Clinton's win against Senator Bernie Sanders, a leftist, was the closest in Iowa Democratic caucus history.

Clinton, 68, prevailed by only four delegates, according to party figures, Sanders, 74, who has strongly attacked Clinton's campaign from the left, declared the result a virtual tie after he had trailed the former first lady in opinion polls for months.

"I think the significance is for folks who did not think Bernie Sanders could win, that we could compete against Hillary Clinton, I hope that thought is now gone," Sanders told CNN.

Iowa has held the first nominating contest in the country since the early 1970s, giving it extra weight in the electoral process that can translate into momentum for winning candidates as they head into months of state-by-state battles.

Cruz, 45, was buoyed by evangelical support. His strong get-out-the-vote effort helped counter the enthusiasm from large crowds that have shown up for Trump's rallies. The real estate magnate skipped the last Republican debate before the caucus because of a dispute with host Fox News.

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 next week. "I'm just honoured," Trump said.

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.

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.

Two White House hopefuls, former Maryland Governor Martin O'Malley, who had trouble gaining any traction in the Democratic race, and former Arkansas Governor Mike Huckabee, a Republican, suspended their campaigns after doing badly in Iowa.