Most observers expected that Hillary Clinton would be crowned the victor in the Democratic presidential primary process at some point after New Jersey voted on Tuesday. Supporters of Bernie Sanders hoped to convince the media to hold off on such an announcement until the convention or, at the very least, until after polls closed in California later Tuesday night. But everyone knew some sort of declaration was coming; Clinton was within a few dozen delegates of winning — including both winning through voting and superdelegates — and New Jersey would put her over the top.

But then on Monday evening, unexpectedly, the Associated Press sent out an announcement: Clinton was already there.

Over the weekend, Clinton won two more Democratic contests that drew her within shouting distance of clinching the nomination — the Virgin Islands and (more important) Puerto Rico. On Monday morning, she needed 23 more delegates to hit the 2,383-delegate mark that constitutes a majority for the convention. She had 1,812 pledged delegates and commitments from more than 500 superdelegates, but she was a bit short of the threshold.

What happened on Monday was that the Associated Press received commitments from enough superdelegates — just enough superdelegates, in fact — to put Clinton over the top. With 23 more superdelegates in hand, Clinton reached the 2,383 mark, and the AP made the call.

Understandably, that out-of-the-blue determination prompted even more frustration and confusion than was already expected. How was the AP sure that those superdelegates wouldn't change their minds? Why release new totals the day before the critical primaries in California? Who were the superdelegates that made the difference?

We did our best to answer those questions.

How does the AP know the superdelegates won't change their minds?

Overnight, the Associated Press published an explanation of how it collects those commitments. It's worth excerpting at length:

The AP surveys the superdelegates throughout the primary season to track whom they plan to support at the July convention.
If a superdelegate tells the AP he or she plans to unequivocally support a candidate at the convention, that's added to the candidate's tally.
Those who decline to answer, say they have yet to make a decision or express any reservations are listed as uncommitted.

What's important to remember is who these superdelegates are. Pew Research broke down their demographics earlier this year. More than half of the 714 superdelegates are members of the Democratic National Committee. Another 261 are members of Congress or governors.

These are firmly entrenched members of the Democratic establishment — by design. The reason superdelegates exist is to act as a veto over the errant will of the voters, should they feel the need to do so. But in this case, the preference of the establishment has aligned with the will of the voters: Clinton will end the primary contest with more pledged delegates, more votes and more victories.

Superdelegates were added to the process in the 1984 presidential election — which, according to MSNBC's Steve Kornacki, was also the first year that the person who lost the popular contest tried to flip the result through their votes.

It didn't work.

The AP's write-up notes that some superdelegates did flip in 2008 — once it became clear that Barack Obama would win the pledged delegate majority. This year, no one has flipped from Clinton to Sanders. There was one conversion: A superdelegate from the Virgin Islands flipped from Sanders to Clinton. In a telephone conversation with The Post, Stephen Ohlemacher, the AP reporter in charge of tallying the organization's delegate count, explained that there had been one other wavering superdelegate.

"There was one early on who was for Clinton," Ohlemacher said. "She's from Puerto Rico, and she switched to uncommitted because she wanted to hear what Hillary Clinton's views were on how to deal with the financial crisis in Puerto Rico before she committed to her."

"Apparently, she must have heard what she wanted to hear, because since then she has switched back to Clinton," Ohlemacher said.

Why announce a winner on Monday?

We should start by noting that the AP made a similarly unexpected call in the Republican race. That contest was essentially over after the May 3 primary in Indiana, but it wasn't until May 26 that the AP's tabulation (including pledges from unbound Republican delegates, the equivalent of superdelegates) put Trump over the top.

In a statement to the media, AP Executive Editor Kathleen Carroll suggested that this was as simple a reason as was required. "By Monday evening, 571 superdelegates had told us unequivocally that they intend to vote for Clinton at the convention," she wrote. "Adding that number to the delegates awarded to Clinton in primary and caucus voting to date gave her the number needed to be the presumptive nominee."

"That is news," she continued, "and reporting the news is what we do."

"We've been chasing this story for months," Ohlemacher added. "We started surveying the superdelegates late last year. We use reporters from all over the country. Mostly it would be state reporters in each state, calling the delegates in their states. Some of us in Washington had done some follow-up."

"As Hillary Clinton was getting closer to 2,383," he said, "we ramped up our efforts to reach out to them to find out if any of these folks were ready to commit to either candidate."

There's some subjectivity to that commitment. "We only add people to the count if they unequivocally tell us that they are going to vote for whichever candidate at the convention," Ohlemacher said. "I've had people say, 'Well, I'm 95 percent there.' And I say, 'Well, get back in touch when you're 100 percent there.' "

You'll notice that this whole process depends on when superdelegates make up their minds. And since so many superdelegates are political actors, you can see how there might be some strategy involved in the timing of how and when superdelegates tell the AP about their commitments.

Which brings us to the next question.

Who put Clinton over the top?

The Intercept's Glenn Greenwald, who supports Sanders, framed the AP's announcement this way.

"AP claims that superdelegates who had not previously announced their intentions privately told AP reporters that they intend to vote for Clinton," he wrote, "bringing her over the threshold. AP is concealing the identity of the decisive super-delegates who said this."

The implication, made clear by the headline of the piece ("Perfect End to Democratic Primary: Anonymous Superdelegates Declare Winner Through Media"), is that those superdelegates withheld their commitments until they saw a politically opportune moment. On Monday, they saw it, and kicked the mechanism the AP uses into gear.

We can't know for sure the extent to which this was a deliberate ploy on the part of Clinton supporters to step on Tuesday's voting results. But it's also not clear at this point where the political benefit from the announcement lies. Intuitively, it seems as though it might benefit Clinton, since Sanders's younger base of voters who planned to come out to the polls on Tuesday might no longer do so — and Clinton's older, more-likely-to-vote base would be less affected.

Journalist Jonathan Alter proposes that Sanders might actually benefit from the outrage that our Robert Costa saw firsthand in San Francisco.

It's possible that the goal wasn't to affect the results but, rather, to re-frame them. No matter what happens in California on Tuesday, it will be accompanied by an asterisk. If Sanders wins, Clinton and/or her supporters can claim that it was backlash to the AP's call. If Clinton wins, Sanders can make the same case — but his long-shot argument for earning the support of superdelegates will be significantly undercut.

In other words, the leak is probably win-win for Clinton — which may have been exactly what the superdelegates that tipped hoped.

We don't know which superdelegates were the ones who informed the AP about their decisions on Monday; the AP declined to tell us who they were.

We do know that it would have happened anyway. Clinton has strong support from the Democratic establishment — but she also won a majority of delegates from voting and more overall votes than Sanders. Is there an outside chance that the Democratic nomination could go to someone besides Clinton? Sure, just as there has always been such a chance between when a candidate clinches and when the nomination is confirmed at the convention.

Monday's announcement may have come earlier than expected, but it was expected.