Hillary Clinton has won the New York Democratic primary, according to MSNBC and Fox News, putting a stop to Vermont Sen. Bernie Sanders's recent seven-state string of victories and making it even more difficult for Sanders to get a majority of pledged delegates to secure the Democratic nomination.

Clinton was the favorite to win all along. She's led in the polls for months in New York, the state she represented in the US Senate. And New York is demographically friendlier territory for Clinton, who has fared better with Latino and African-American voters, than some of the states Sanders has recently won, such as Wyoming and Utah.

Still, it's delegates, not states, that really count in the race for the Democratic nomination. And it's not yet clear how exactly Clinton fared in the delegate count. New York allocates most of its 247 pledged delegates by congressional district. That means Clinton's full delegate total won't be known until results from all congressional districts are in.

The next states are likely to be better for Clinton

Even before voters went to the polls, Sanders's campaign was downplaying the importance of a win in New York. "We don’t have to win New York on Tuesday, but we have to pick up a lot of delegates," campaign manager Jeff Weaver wrote in a campaign email, according to Politico.

But the truth is that Sanders needed to win a very high proportion of delegates going forward — around 56 percent even before the New York primary — in order to have a majority of pledged delegates by the Democratic National Convention.

The New York primary came at a historically odd moment in the presidential election cycle. Clinton has been steadily chugging her way toward the nomination, retaining an an impressive lead among delegates, while slipping in national polls and losing a slew of states to Sanders.

Even if Clinton's victory in New York is narrow, it puts an end to that losing streak. And the next states to vote on April 26 — Connecticut, Delaware, Maryland, Pennsylvania, and Rhode Island — play more to her strengths in demographics, making it more likely that the New York primary will be the start of a string of victories.