DETROIT — Sen. Bernie Sanders's political revolution shifted to emergency footing this weekend, rushing resources and staff to Michigan for a climactic battle against the surprise momentum of former vice president Joe Biden.

The strategy echoes Biden’s all-in bid in South Carolina two weeks ago, a gambit that resurrected his foundering campaign with a decisive win and led to 10 victories in Super Tuesday states.

Michigan, which holds its primary Tuesday, looms as hugely important for the senator from Vermont because of its dual standing, as a state he won in the 2016 primaries and which also is likely to play a decisive role in the general election.

“We need all hands on deck. We got our backs against the wall,” Harvard philosopher Cornel West thundered during introductions for Sanders at a rally here Friday, after announcing he had canceled three events in Boston to be there. “We’re coming out swinging.”

Trying to make a final stand against Biden, Sanders canceled a planned speech on race and justice in Mississippi to attend the Detroit event, one of at least five in three days he plans while the former vice president is campaigning elsewhere. Much of his Iowa campaign operation, including his former state director Misty Rebik, has flown in to organize on the ground, where Sanders boasts a far more extensive network of volunteers and field offices than Biden.

Michigan was one of three traditionally Democratic states — Wisconsin and Pennsylvania were the others — that turned the 2016 election to Donald Trump. Both Sanders and Biden have argued that their primacy in the Upper Midwest would make them more competitive than the alternative against Trump in the fall. Michigan’s direction also may foretell the dynamics in a host of other nearby states that vote later in the process, including Ohio and Illinois next week.

For Sanders, there is no certainty that Michigan will provide a repeat of the lift he received in 2016, when he narrowly defeated former secretary of state Hillary Clinton in a similar one-on-one faceoff by attacking her past support for the North American Free Trade Agreement and her vote to authorize the 2003 Iraq War.

Sanders is now attacking Biden on those same grounds and others, as he tests whether he can turn out a coalition he has promised will remake the Democratic Party and defeat Trump in the fall — but which has shown up in only a limited way so far. The demographics of Michigan, with a large Muslim population, a core of working-class white voters, a significant college-age voting bloc and an African American community with close ties to organized labor, provide a unique backdrop to test Sanders’s vision.

“It’s not do-or-die mathematically. But I do think it is a chance to show just how outraged voters in swing states can get about Joe Biden’s record,” Sanders campaign spokesman Bill Neidhardt said. “I think Joe is going to have a problem. We are going to try to make sure he has a problem.”

But the former vice president’s allies say the state’s politics have changed dramatically over the past four years, following the trauma of Clinton’s general-election loss and a banner 2018 election that ushered in a new set of moderate Democrats across the state. Those victories were driven by increased turnout for Democrats in college-educated communities around the state, propelling candidates like now-Gov. Gretchen Whitmer to a nine-percentage-point victory. Whitmer endorsed Biden on Thursday and became a co-chair of his campaign.

“Joe Biden is the one who is running on the blueprint that we ran on in 2018,” Whitmer said in an interview Friday alongside Lt. Gov. Garlin Gilchrist II. “As I look to the fall, Joe Biden’s message is one that I know will resonate across the state.”

A high-stakes showdown in Michigan has been forced on the Sanders campaign by Biden’s Super Tuesday upsets in states like Texas and Virginia, and by the rapid consolidation in the race. In the past two weeks Biden has been endorsed by three of the candidates who had a shot at winning delegates here: former New York mayor Mike Bloomberg, former South Bend, Ind., mayor Pete Buttigieg and Sen. Amy Klobuchar (D-Minn.).

Sen. Elizabeth Warren (D-Mass.) has also dropped out, though she has not yet endorsed another candidate. A February Washington Post/ABC News poll found that while Sanders was ranked higher as a second choice by many Warren voters, a significant chunk favored moderate candidates, including Biden.

The momentum last week was on Biden’s side. Exit polls found that Sanders won no more than 30 percent of late-deciding voters in any state on Super Tuesday, except for his home state of Vermont — and there his overall percentage dropped significantly from 2016. With more than 3 million votes still being counted in California, Biden has won 568 convention delegates, Sanders has 495 and Rep. Tulsi Gabbard (D-Hawaii), who is still campaigning, has two.

A candidate needs 1,991 pledged delegates to win the nomination outright on the first ballot at the Democratic National Convention in July. Sanders has said the nomination should go to the candidate with the most delegates, even if no one reaches 1,991, while Biden has said he would be willing to fight at the convention to overcome a Sanders delegate lead.

At the rally Friday, Rep. Rashida Tlaib (D-Mich.), an early backer of Sanders, told his supporters they had only four days to show the political establishment “that they underestimate us.”

In an interview, she said she doubted that Biden’s momentum would give him an advantage with voters who said “electability” was their top issue.

“I heard the same information when Secretary Clinton was running against Bernie last time,” Tlaib said, referring to Sanders’s upset victory in 2016. “Bernie was able to create a really inspiring movement. He came, and he toured the community, and he saw firsthand what was happening. People really feel it in Michigan, that he’s a once-in-a-lifetime candidate.”

While there was a pep-talk feeling in Detroit — “We’re going to do this!” one speaker declared — there also was growing anxiety among some Sanders supporters that the race was slipping away.

“I wish I had seen more from the campaign,” said Susannah Roff, a 71-year-old retiree from Detroit. She moved to the area three years ago from California, where her friends and neighbors were more outwardly political and where elections were big events. In Michigan, she’d been surprised how quiet the run-up to the election had been. “People talk, and they know who Bernie is, so it’s not about that,” she said. “But you don’t see campaign signs anywhere.”

Like others in the room, she expressed hope that Sanders would pull out a victory here, but she also felt a sense of nervousness, laced with a little bit of conspiracy.

“All along I’ve wondered if they would really let someone like Bernie win,” she said, referring to the Democratic establishment. “They will do anything to do stop him.”

Among those in the room were several who identified themselves as workers who had broken ranks with their labor unions to support Sanders. One group waved giant individual letters spelling out U-N-I-O-N during Sanders’s speech, while others stood and waved campaign signs on which they had added, in black marker, “union member for” or “AFT member for” atop the “Bernie” logo.

“It’s tough when your union is backing the other candidate,” said Kevin Mack, a union member from Detroit who declined to say where he worked or to which union he belonged, because it was backing Biden. “They say they want to play it safe. But where did playing it safe with Hillary get us? It got us Trump.”

Sanders’s supporters are hopeful that union ties will help him pick up support among black voters, who have sided overwhelmingly with Biden in Southern state primaries this year where organized labor has less influence. Biden’s aides, meanwhile, have argued that his role in the 2009 automobile industry bailout and his long ties to organized labor will insulate him against the Sanders attacks that tarnished Clinton.

“While the economy is a little bit better, people are economically anxious and I think are wanting less chaos,” said Jill Alper, a Democratic strategist who supported Clinton in 2016 and worked on Bloomberg’s presidential effort. “And I think that will accrue to benefit vice president Biden because he will be seen as a steady hand.”

Mack said many union workers he knew were breaking with the leadership to support Sanders — not unlike how Culinary Union members in Nevada went heavily for the senator from Vermont, even as their leaders trashed his Medicare-for-all plan. He suggested the silent union support for Sanders could be enough to help him clinch Michigan.

But although he believed Sanders could win, he was nervous.

“They are throwing everything at him,” Mack said, citing criticism of the health-care plan and Biden’s argument that he is best positioned to defeat Trump.

The two campaigns have also taken radically different approaches to organizing the state. Biden’s Michigan headquarters is on a side street off Woodward Avenue in Detroit’s north end, on the edge of a neighborhood that has been the epicenter of the city’s redevelopment renaissance.

Once one of Detroit’s oldest and grandest neighborhoods, the area had been marred by abandoned buildings and blighted homes. Now it is full of shops and restaurants with a brand-new streetcar line that ferries residents and visitors from the area into a booming downtown — a transformation spurred in part by the Obama administration’s help after the city’s 2013 bankruptcy. Biden, who will not visit the state until Monday, was the administration’s point man on Detroit — a fact he repeatedly touted on the debate stage here last summer, as the political world marveled at the transformation of a city that was once left for dead.

Sanders’s office is on the opposite side of town, along Grand River Avenue, which was also once one of Detroit’s most storied streets, home to sprawling auto dealerships and thriving middle-class neighborhoods. But Grand River’s neighborhoods have not enjoyed the same revitalization.

Sanders’s office, which opened Feb. 21, is in an old retail space that has long been vacant. Workers painted a large mural reading “Bernie” on the side of the building as a makeshift sign, while a half-dozen campaign signs were propped up in the barred windows. Misspelled hand-lettering on the front door reads “Gospel House Entranc” — left behind by the religious bookstore that used to occupy the space.

“Bernie is trying to get people to face the fierce urgency of now,” said Rick Martin, a black activist and former local UAW president who is supporting Sanders. “For so many people in these areas, they don’t turn out because they feel like their lives are not going to change, no matter who is in office.”

Sanders has also ramped up activity in western Michigan, where he soundly defeated Clinton in 2016. In Grand Rapids, Sanders has had volunteers working on his behalf for the better part of the last four years and recently opened a field office and brought in staff in hopes of scoring another big victory.

But while Sanders still enjoys strong support, he faces tougher competition in Biden for the working-class Democrats and independents he won in 2016. Anyone can vote in Tuesday’s Michigan primary, and with no Republican contests, crossover votes from independents and even Republicans disillusioned with Trump could help Biden.

Since Trump defeated Clinton in the area, Democrats have seen an uptick in party registration and activity spurred by anti-Trump sentiment. A coalition of suburban women and college-educated white voters elsewhere helped Democrats make gains in the state in the 2018 midterms and is expected to be active in Tuesday’s primary. That could be pivotal for Biden, who has won support from similar groups in other early states. Sanders is set to visit Grand Rapids on Sunday, while Biden is coming Monday.

“We are definitely turning bluer,” said Gary Stark, chairman of the Kent County Democratic Party, which includes Grand Rapids. “I think Biden will do well here. Whether he will win or not, I don’t know, but it won’t be an embarrassment.”

David Weigel and Jose A. Del Real in Detroit contributed to this report.