LAS VEGAS — Hillary Clinton, battered and buffeted by an unexpectedly vigorous challenge from a unlikely rival, finally got to give a victory speech, and it could not have come at a more critical time.

The firewall held, and Clinton’s win in Nevada’s Democratic caucuses Saturday lifts an enormous weight off her campaign’s shoulders, tamping down both Bernie Sanders’ momentum and her own supporters’ increasing anxiety.

The road for Clinton improves dramatically from here, and Nevada was a linchpin in Sanders’ plan to break through the former secretary of state’s advantage in diverse states before the contest moved to a much larger month with several more diverse states holding contests.

“This is for you!” Clinton declared to screaming fans at Caesar’s Palace.

Analysis: Nevada Win Offers Sigh of Relief for Clinton

The former New York senator spent much of her speech focusing on her supporters and the need to build a movement together, before heading for the airport on her way to Texas to court its 222 delegates up for grabs on Super Tuesday, March 1.

Clinton arguably boasts experience in government unparalleled by anyone in the presidential field — but that has also made her a high-profile target for attack.

Sanders has a decent story to tell in Nevada as well, where entrance polls showed him winning Latinos (even though Clinton appeared to win many Latino precincts). The Vermont senator can say he cut well into her margin of victory in a diverse electorate and outperformed expectations set a few months ago.

Results: Full Numbers from Nevada Democratic caucus

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“Nevada was supposed to be a state ‘tailor made’ for the Clinton campaign, and a place she once led by almost 40 points,” Sanders said in a fundraising email sent to supporters Saturday afternoon. "But today, we sent a message that will stun the political and financial establishment of this country: Our campaign can win anywhere.”

Also on Saturday, a new NBC News, Survey Monkey poll showed that Sanders has closed his gap among Latinos nationally, pulling within three points of Clinton among the group.

But Sanders, who scored a near-tie and an big win in the overwhelmingly white states of Iowa and New Hampshire, respectively, knows he needed something that could be called a win in a non-white state, and Nevada was probably his best shot to get one.

The night before the caucus, he raised expectations by predicting a history-making moment Saturday. “It could well be that in 10, 20, 30 years from now, people may well look back at what happened in Nevada and say this was the beginning of the political revolution,” Sanders said at a rally Friday night.

While Clinton’s support among Latinos — a group she won in 2008 even though she lost the nomination — may to have suffered, her campaign is relieved that her overwhelming support among African-Americans held firm.

African-Americans went for Clinton 76-22 percent, according to NBC’s entrance poll, and they proved decisive in her Nevada win.

So did a ground operation that even Sanders allies acknowledged was superior. After beginning six months before Sanders did, many voters reported getting numerous contacts from Clinton’s campaign and only few or none from Sanders.

Clinton has also honed what had been a scattershot message after her New Hampshire loss, zeroing in on Sanders as a “single-issue candidate” and pitching herself as someone who wants to “break down barriers.”

Speaking outside Las Vegas in Henderson, Sanders thanked his supporters for all their work and tried to paint a more uplifting picture. “Taking on the establishment,” he acknowledged, “is not easy.”

“The wind is at our backs, we have the momentum,” he said before declaring that it was on to Super Tuesday, without mentioning South Carolina’s contest next Saturday.

It will be difficult for Sanders to regain the kind of momentum he earned coming out of New Hampshire.

The Nevada results tee up a critical week ahead of South Carolina’s primary next Saturday, where as much as 60 percent of the electorate is expected to be black. And just four days later, 11 states vote on March 1, including seven Southern states with large African-American populations.

Related: If Donald Trump Can't Stop Donald Trump, Who Can?

Sanders is hoping to narrow the margin in South Carolina by as much as possible, and hoped a Nevada win would boost that effort. There are other states that favor Sanders on March 1, including Minnesota, Colorado, Massachusetts and his home state of Vermont. But Clinton forces will attempt to explain away wins there by pointing to their large white populations and caucus format (even though caucuses in Iowa and Nevada have favored her so far.)

With distrust brewing on both sides ahead of the caucus and accusations of dirty tricks flying in both directions, the loss for Sanders has the potential to tip off an even more acrimonious phase of the election.

It remains to be seen how the delegates will shake out in Nevada, but Clinton will leave the Silver State with more nominating votes if so-called super delegates are included.

That result is likely to add more fuel to a push from Sanders supporters against the super delegate system, which gives elected Democratic officials and party leaders a chance to cast a nominating vote for whomever they chose. Clinton currently has an enormous lead among super delegates, and they could tip the balance in her favor even if she wins narrowly in primaries and caucuses, something groups that support Sanders, like MoveOn.org, are fighting against.