DES MOINES, Iowa (AP) — Ted Cruz, a fiery, conservative Texas senator loathed by his own party’s leaders, swept to victory in Iowa’s Republican caucuses Monday, overcoming billionaire Donald Trump and Florida Sen. Marco Rubio.

Cruz’s victory was a harsh blow to Trump, the supremely confident real estate mogul who has roiled the Republican field for months with controversial statements about women and minorities.

The victory in the first Republican nominating contest ensures that Cruz will be a force in the presidential race for weeks to come — if not longer. The first-term Texas senator now heads to next week’s New Hampshire primary as an undisputed favorite 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.

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, extensive media coverage and national poll numbers that before Monday night had established him as the Republican front-runner.

“Iowa has sent notice that the Republican nominee and next president of the United States will not be chosen by the media, will not be chosen by the Washington establishment,” Cruz told supporters.

Trump came in second, only slightly ahead of Rubio, who achieved a credible showing by nearly besting Trump. Rubio’s stronger-than-expected finish could help cement his status as the favorite of mainstream Republican voters who worry that Cruz and Trump are too caustic to win the November general election.

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

Candidates 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.

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 1 percent of the delegates who select the nominee. 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.

Rubio cast his stronger-than-expected finish as a victory.

“We have taken the first step, but an important step, to winning the nomination,” the Florida senator said at a campaign rally in Des Moines.

Trump sounded humble in defeat, saying he was “honored” by the support of Iowans. And he vowed to keep up his fight for the Republican nomination.

“We will go on to easily beat Hillary or Bernie or whoever the hell they throw up,” Trump told cheering supporters.

Some of the establishment Republican candidates have been focusing more on New Hampshire than Iowa, including former Florida Gov. Jeb Bush, Ohio Gov. John Kasich and New Jersey Gov Chris Christie.

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

___

Associated Press writers Julie Pace in Washington and Ken Thomas, Catherine Lucey, Lisa Lerer, Scott McFetridge and Scott Bauer in Iowa contributed to this report.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.