Sen. Bernie Sanders handily defeated former Secretary of State Hillary Clinton in the New Hampshire primary on Tuesday, but she may come out of the state on top in the delegate count due to the pre-pledged support of superdelegates.

Here’s why: New Hampshire has 24 Democratic delegates distributed based on the number of votes each candidate receives.

According to the Associated Press, the Vermont senator earned at least 13 of the Democratic delegates with 60 percent of the vote in the Granite State. Because New Hampshire isn’t a winner-take-all state, Clinton won at least nine delegates with her 38 percent of the vote. A remaining two delegates have yet to be determined based on popular vote totals, according to AP.

But New Hampshire also has eight Democratic “superdelegates” — party insiders who aren’t bound by the popular vote outcome and can support any candidate they choose. Six of the superdelegates said before Tuesday night’s voting that they plan to support Clinton at the Democratic National Convention in July.

Democratic presidential candidates Hillary Clinton, left, and Sen. Bernie Sanders, I-Vt, pose for a photo before debating at the University of New Hampshire Thursday, Feb. 4, 2016, in Durham,NH (AP Photo/Jim Cole)

Democratic presidential candidates Hillary Clinton, left, and Sen. Bernie Sanders, I-Vt, pose for a photo before debating at the University of New Hampshire Thursday, Feb. 4, 2016, in Durham, N.H. (AP Photo/Jim Cole)

That support isn’t binding, though — superdelegates can switch candidates between now and the convention.

Clinton’s Granite State superdelegates include New Hampshire Democratic lawmakers Gov. Maggie Hassan, Sen. Jeanne Shaheen and Rep. Annie Kuster, according to The Hill. One of the undecided superdelegates is Ray Buckley, chairman for the New Hampshire Democratic Party, who was barred by state party rules from selecting a candidate prior to the primary in an effort to maintain neutrality.

The Clinton campaign has made an effort to win the support of superdelegates across the nation — reportedly sewing up 360 superdelegates’ support before a single vote was cast.

The end result is that Clinton currently holds an assumed 394 delegates, and Sanders has 42 after the first two contests in Iowa and New Hampshire. Clinton’s victory in the Iowa caucuses was by less than one percent.

A candidate must have total of 2,382 delegates in order to win the Democratic nomination.