The state’s progressive base, which helped elect Representative Ilhan Omar in 2018, had been loyal to Mr. Sanders, and his campaign had hoped to win a big share of the state’s 75 delegates.

But Ms. Klobuchar is immensely popular in her home state, and recent polling showed her maintaining a slim lead over Mr. Sanders. With her exit, large parts of that support appeared to have shifted to Mr. Biden.

The results were also disappointing for Mr. Bloomberg, who spent more than $10 million on ads in the state, according to Advertising Analytics, in an effort to amass delegates in some of the more rural and ignored congressional districts. Though he remained in the low single digits in statewide polls, Mr. Bloomberg had been the sole political advertiser in some markets.

Minnesota has been reliably blue for decades, and was the only state to go for a Democrat in 1984 thanks to the home-state candidate, Walter Mondale, but the 2016 election showed a Republican surge, as Mrs. Clinton eked out a victory over President Trump by just 45,000 votes. The president’s re-election campaign has been focused on the state, including holding a rally there in October.