Hillary Clinton and Donald J. Trump overwhelmed their rivals in the Arizona primaries on Tuesday, a show of might from two presidential front-runners who are hoping to avoid prolonging the nominating contest and begin training their fire on each other.

But Senator Bernie Sanders thrashed Mrs. Clinton in the Idaho and Utah Democratic caucuses, demonstrating his enduring appeal among liberal activists even as she closes in on the party’s nomination. And Senator Ted Cruz, who won the Republican contest in Utah, captured more than 50 percent of the vote, giving him all 40 of the state’s delegates and sustaining hope among Mr. Trump’s opponents that he can be slowed, if not stopped.

Mrs. Clinton’s commanding victory in Arizona, where 75 Democratic delegates were at stake, gave her the night’s biggest prize, and her margin there was substantial enough that Mr. Sanders was unlikely to emerge with significantly more delegates, though he took two states to her one.

Speaking to supporters in Seattle after winning Arizona, Mrs. Clinton looked past her primary. She used her remarks mainly to address the terrorist assault on Brussels and turned toward an attack on Mr. Trump and Mr. Cruz, the two leading Republican contenders.