Donald Trump won the Arizona Republican presidential primary on Tuesday and Hillary Clinton was the victor in the Democratic contest as the front-runners in both parties extended their leads.

The real estate mogul was declared the winner by the Associated Press, beating Texas Senator Ted Cruz and Ohio Governor John Kasich in a race he dominated with his populist and anti-immigration messages. He captured all of the state’s 58 delegates, blunting the concerted effort by his opponents to deny him the party’s nomination.

With her win, Clinton built on her commanding lead in delegates and diminished the possibility of a resurgence by Bernie Sanders to slow her march to the nomination.

Republicans are also caucusing in Utah, while Democrats are voting in caucuses in Utah and Idaho.

Trump won despite efforts by Cruz, 2012 nominee Mitt Romney and others to consolidate Republican support to block the billionaire from securing the 1,237 delegates he needs for the nomination. Tuesday’s Republican contests were the first since Senator Marco Rubio of Florida dropped out of the presidential, and that may have been a factor in the result. Arizona allows early voting and initial returns had Rubio drawing more than 55,000 votes, almost 17 percent of the total vote, according to Associated Press totals.

Terrorist Attacks

Voters went to the polls on a day at least 31 people were killed in bombings in Brussels, for which Islamic State claimed responsibility. The threat of terrorism and how the U.S. should respond dominated much of the campaign discussion throughout the day. Trump, who has called for closing the U.S. border, had said he was proven more correct about terrorism than any other candidate. Clinton had criticized calls by Trump and Cruz to close the U.S. border and secure Muslim neighborhoods in response.

The voting on Tuesday was a test of whether Trump is solidifying his push toward the party’s nomination or the movement to block him is gaining momentum.

Nomination Fight

While Cruz is making the case that Republicans should rally around him as the best chance to defeat Trump and elect a conservative, and Kasich wants a contested convention in Cleveland in July, Trump is arguing that the party should get behind him now or risk losing the general election.

“If people want to be smart, they should embrace this movement,” Trump said at news conference in Washington on Monday. “If they don’t want to be smart, they should do what they’re doing now.”

Cruz was leading polls in Utah, and the major question is whether he will top the 50 percent threshold needed to win all of the state’s 40 delegates, said Richard Davis, a political science professor at Brigham Young University in Provo. If no candidate receives at least half the vote, the delegates are awarded proportionally.

The Texas senator is attracting support among voters who don’t want to see Trump prevail, and he got a boost from Romney, who backed the senator on Friday and made a pre-recorded call for him this week, Davis said. Utah Governor Gary Herbert also said on Monday he would vote for Cruz, calling him a “consistent conservative” who should win all of the state’s delegates.

Utah’s Votes

Trump isn’t popular in Utah, where two-thirds of residents are Mormons and the Church of Jesus Christ of Latter-day Saints took the unusual step last year of issuing a statement supporting religious pluralism after Trump vowed to bar Muslims from entering the country, Davis said.

At a rally in Salt Lake City last week, Trump said of Romney, who has been a leader in the church, “Are you sure he’s a Mormon? Are we sure?”

Kasich has held campaign events in Utah and run television ads seeking to earn delegates there as part of his plan to prevail at a contested party convention on grounds that he’s best able to win the general election.

While Kasich has the backing of Mike Leavitt, the former Utah governor and Cabinet official in George W. Bush’s administration, Romney and Cruz are telling voters that a vote for Kasich is essentially a vote for Trump.

The Ohio governor is a distant third in delegates so far with 143, behind Cruz with 424 and Trump with 680, according to an Associated Press delegate tally.

Clinton’s Advantage

Clinton won the state despite a push by Sanders because of her strong ties to the state and it’s Latino community and her advantage in early voting, said Bob Grossfeld, a Democratic consultant in Phoenix who isn’t aligned with either campaign.

“At this point, anybody putting on a last-minute push better be targeting really well or they’re going to waste a whole lot of money,” Grossfeld said.

Coming off five losses last Tuesday, Sanders has heavily invested his time and money in Tuesday’s three western states, particularly Arizona. Sanders has held several large rallies in Phoenix, Flagstaff, and Tucson, and held a press conference on the U.S.-Mexico border.

His campaign spent $1.3 million on TV advertising in Arizona, where he aired ads in English and Spanish, according to NBC, citing data from SMG Delta. He also spent $109,000 in Idaho and $352,000 in Utah. Hillary Clinton spent just $600,000 in Arizona.

In Utah, Sanders led Clinton by 8 percentage points in a Deseret News/KSL poll of likely voters conducted March 8-15, and the state’s mostly white, well-educated electorate favors the Vermont senator, said Davis of Brigham Young.

Sanders also hopes to win the caucuses in Idaho, though the two states have 64 total delegates combined compared with 85 in Arizona.

Clinton holds a delegate lead of 1,630 to 870, according to an Associated Press tally. That includes superdelegates, who are party leaders and others who can change their minds.