MANCHESTER, N.H. (AP) — The first polls closed in New Hampshire Tuesday night as fiery progressive Bernie Sanders fought for Democratic front-runner status in the first-in-the-nation primary. The party hoped for results that would bring some clarity to a presidential nomination fight that has so far been marred by dysfunction and doubt.

As Sanders predicted victory, former Mayor Pete Buttigieg hoped to seize the backing of his party’s establishment with a strong finish. Joe Biden wanted to avert political disaster after leaving the state hours before polls began closing at 7 p.m. Most voting places were closing at 8 p.m.

By night’s end, New Hampshire could begin culling the Democrats’ unwieldy 2020 class, which still features nearly a dozen candidates battling for the chance to take on President Donald Trump fall. Tuesday’s contest comes just eight days after Iowa caucuses injected chaos into the race and failed to report a clear winner.

New Hampshire Democrats headed into Tuesday’s primary with a focus on matters of fairness.

Just over 1 in 10 said they were “very confident” that their party’s process for choosing a presidential nominee was fair, according to a wide-ranging AP VoteCast survey. At the same time, nearly 8 in 10 also viewed the economy as unfair, although there was little consensus on which candidate would do the best job of stewarding the world’s largest economy.

For Sanders, the New Hampshire primary was an opportunity to build on his dominance of the party’s left flank. A repeat of his strong showing in Iowa could severely damage progressive rival Sen. Elizabeth Warren, who faced the prospect of an embarrassing defeat in a state that borders her home of Massachusetts.

While Sanders marches forward, moderates are struggling to unite behind a candidate. After essentially tying with Sanders for first place in Iowa, Buttigieg, the 38-year-old former mayor of South Bend, Indiana, began his day as the centrist front-runner. But Minnesota Sen. Amy Klobuchar was mounting a spirited bid for the same voters.

Having already predicted he would “take a hit” in New Hampshire after a distant fourth-place finish in Iowa, Biden was essentially ceding the state. He was traveling to South Carolina Tuesday as he bet his candidacy on a strong showing there later this month boosted by support from black voters.

More than a year after Democrats began announcing their presidential candidacies, the party is struggling to coalesce behind a message or a messenger in its desperate quest to defeat Trump. That raised the stakes of the New Hampshire primary as voters weighed whether candidates were too liberal, too moderate or too inexperienced — vulnerabilities that could play to Trump’s advantage in the fall.

Some candidates sought to undercut the importance of the New Hampshire election, but history suggested otherwise. No Democrat has ever become the party’s presidential nominee without finishing first or second in New Hampshire.

During the final day of campaigning, many voters said they were still struggling to make a choice. Betty-Joy Roy, a 64-year-old director of activities at an assisted living facility in Manchester, said she decided only Monday to vote for Sanders.

“I’m sick of politics as we know it, and I’m ready for someone who can do something,” she said. “It was between him and Biden. I was having a hard time but I think we need a change.”

Democrats were closely monitoring how many people showed up for Tuesday’s contest. New Hampshire’s secretary of state predicated record-high turnout, but if that failed to materialize, Democrats would confront the prospect of waning enthusiasm following a relatively weak showing in Iowa last week and Trump’s rising poll numbers.

Trump, campaigning in New Hampshire Monday night, sought to inject chaos in the process. The Republican president suggested that conservative-leaning voters could affect the state’s Democratic primary results, though only registered Democrats and voters not registered with either party can participate in New Hampshire’s Democratic presidential primary.

“I hear a lot of Republicans tomorrow will vote for the weakest candidate possible of the Democrats,” Trump said Monday. “My only problem is I’m trying to figure out who is their weakest candidate. I think they’re all weak.”

Trump also attacked Michael Bloomberg, who was showing signs of strength in polling around the country but wasn’t on the New Hampshire ballot. The president highlighted Bloomberg’s comments during a 2015 appearance at the Aspen Institute in which he said the way to bring down murder rates was to “put a lot of cops” in minority neighborhoods because that’s where “all the crime is.”

Biden — and the Democratic Party’s establishment wing — may have the most to lose in New Hampshire should the former two-term vice president underperform in a second consecutive primary election. Biden has earned the overwhelming share of endorsements from elected officials across the nation as party leaders seek a relatively “safe” nominee to run against Trump.

But things are changing.

New Hampshire House Speaker Steve Shurtleff, who endorsed Biden less than a month ago, spoke about him over the weekend as if he were already eliminated from contention.

“I hope the vice president does well, and I hope he can move forward, but it’s hard to say,” Shurtleff said in an interview. “The sad thing for me personally is that he’s such a terrific individual.”

Biden’s campaign, meanwhile, sought to cast New Hampshire as one small step in the path to the presidential nomination, with contests coming up in more diverse states that award more delegates including Nevada and South Carolina, where Biden hopes to retain his advantage among minority voters.

“Regardless of what happens on Tuesday, we plan to move forward,” Biden senior adviser Symone Sanders said.

The stakes were dire for Warren as well in a contest set just next door to her Massachusetts home. She has positioned herself as a mainstream alternative to Bernie Sanders but is suddenly looking up at him and Buttigieg as Klobuchar fights to peel away female support.

Warren released an afternoon memo seeking to downplay New Hampshire’s results. Campaign manager Roger Lau outlined a “path to victory” through 30-plus states where the campaign has paid staff on the ground as he highlighted alleged weaknesses in Warren’s Democratic rivals.

Buttigieg, young and with no governing experience beyond the mayor’s office, is trying to emerge as the leading Biden alternative for his party’s moderate wing. He has aggressively courted moderate Democrats, independents and what he calls “future former Republicans” as he tries to cobble together a winning coalition, just as he did in Iowa, where he finished in a near tie with Sanders for the lead.

In the days leading up to Tuesday’s primary, Buttigieg has come under increasing attack from Biden and Klobuchar, who seized on his lack of experience. And from the left, Sanders attacked Buttigieg’s reliance on big-dollar donors, which sparked jeers of “Wall Street Pete” from Sanders’ supporters.

Sanders has been one of the only candidates to explicitly predict victory in New Hampshire, where he defeated Hillary Clinton by more than 20 percentage points four years ago.

Sanders spent the eve of the primary courting his most passionate supporters, young voters, at two college campuses. At a Monday night rally at an arena on the University of New Hampshire campus, a band pumped up the crowd with a cover of The Who’s “My Generation,” before Sanders and Rep. Alexandria Ocasio-Cortez, a leading figure among young progressives, took the stage.

“Brothers and sisters, we are making history in this campaign,” Sanders declared at one event in Hudson.

After New Hampshire, the political spotlight shifts to Nevada, where Democrats will hold caucuses on Feb. 22. But several candidates, including Warren and Sanders, plan to visit states in the coming days that vote on Super Tuesday, signaling they are in the race for the long haul.