LOS ANGELES — Bernie Sanders won Super Tuesday’s biggest prize, taking California on a night he sought to blunt the momentum of a suddenly surging Joe Biden in the race for the Democratic presidential nomination.

California was only one of 14 states that voted Tuesday, but its more than 400 delegates made it the most coveted primary in the narrowing Democratic field. But it is not clear how many delegates Sanders will claim from California, given the state’s complicated process for awarding them. The final tally won’t be sorted out for days as state officials still must count late arriving mail-in ballots.

In early returns, Sanders led with 29% of the vote. Biden was second with nearly 19% while former New York Mayor Mike Bloomberg was third with just under 18%. Massachusetts Sen. Elizabeth Warren was fourth with 12%.

Sanders went all-in on California four years ago, hoping the deep-blue state would give him the surge he needed to defeat establishment candidate Hillary Clinton. He lost on election night in 2016, but his sophisticated campaign operation never left. He opened field offices across the state, including far-flung outposts in the state’s Central Valley, areas traditionally ignored by presidential campaigns.

He aggressively courted Latino voters, who make up 40% of the state’s population, and he worked hard to make sure voters who were not registered with a political party knew how to request a ballot and vote for him.

“Tonight I assure you with absolute confidence, we are going to win the Democratic nomination,” Sanders told supporters in Vermont on Tuesday. “What we need is a new politics that brings working class people into our political movement which brings young people into our political movement and which in November will create the highest voter turnout in America’s political history.”

Tuesday’s election came just days after voters in South Carolina resurrected Biden’s candidacy, forcing moderate rivals Pete Buttigieg and Amy Klobuchar to end their campaigns and endorse the former vice president. The reshuffled field gave many of California’s 20 million registered voters reason to rethink their ballots.

The Associated Press called the race for Sanders on Tuesday before any votes were counted, relying on AP VoteCast, a wide-ranging survey of the American electorate.

Sanders’ strongest supporters tend to be younger and Hispanic, two groups that don’t usually vote early. But the survey saw Sanders had a big lead in ballots that were mailed before election day. Many of those ballots were sent before Biden’s victory in South Carolina led Klobuchar and Buttigieg to quit the race.

That means any candidate chasing Sanders would have to make up lots of ground in ballots cast in person on Election Day, but VoteCast found Sanders had an edge in those votes, too.

Biden reveled in his wins in other states, including Virginia, Oklahoma, Tennessee and Alabama — states where Biden did not have a big campaign presence.

Speaking to supporters in Los Angeles, a jubilant Biden mocked critics who declared his campaign dead.

“We were told, ‘Well, when you got to Super Tuesday it would be over,’” Biden said. “Well it may be over for the other guy.”

California continued a disappointing night for billionaire Bloomberg, who skipped the early primary states to focus his fortune on Super Tuesday. His ads dominated the airwaves in the state’s expensive media markets, but it wasn’t enough to surpass Sanders.

Warren, who had been battling with Sanders for the heart of the party’s progressive wing, picked up a late endorsement from Jennifer Siebel Newsom, wife of Gov. Gavin Newsom. The boost might be enough for the Warren campaign to get above the 15% threshold required to win delegates.

President Donald Trump, who lost California by over 4 million votes in 2016, faced only token opposition in the state’s Republican primary. Meanwhile, California Republicans were trying to position themselves to retake a string of U.S. House seats that Democrats seized in 2018.

In the 25th Congressional District, Republicans were hoping to recapture a seat won in 2018 by former Democratic U.S. Rep. Katie Hill, who resigned last year following a House ethics probe and sex scandal.

Democrat Christy Smith was leading Republican Mike Garcia in a special election to finish the remainder of Hill’s term, and also in a separate primary election for the next term of Congress.

In the 50th Congressional District, former Republican U.S. Rep. Darrell Issa was leading a trio of other Republicans. The seat was left vacant after the resignation of former Rep. Duncan Hunter, who stepped down after pleading guilty to a corruption charge.

And a statewide ballot measure to borrow $15 billion to modernize and update public schools was losing in early returns, with millions of votes in Los Angeles and San Francisco yet to be counted.

Speaking at a Sacramento polling place , Gov. Gavin Newsom declined to say who he voted for on Tuesday. But he predicted the party would unify as before come November.

Associated Press journalists Michael R. Blood and Cuneyt Dil contributed to this report.

MORE: Super Tuesday’s full election results