(Bloomberg) -- Two months ago, Bernie Sanders’ presidential bid seemed to be faltering. His progressive rival Elizabeth Warren had surged past him in the polls and he suffered a heart attack that raised serious questions about his durability.

He seems to have rebounded in recent weeks as he’s stuck to Medicare for All while other candidates have softened their stances and as he’s gained star endorsements from the younger faces in the movement.

National surveys released Tuesday by Quinnipiac and Monmouth show him slightly ahead -- but within the margin of error -- for second place among Democrats, behind Joe Biden.

And he’s going strong in the early nominating states. Recent polls place him second in Iowa — where he’s returning for several events this weekend — and statistically tied for the lead in New Hampshire and second in Nevada. And he’s statistically tied with Warren for the lead in California, a Super Tuesday state that provides 10% of the delegates to the Democratic nominating convention.

He has been aided by endorsements from young progressive stars like Alexandria Ocasio-Cortez and by staying out of clashes that have enveloped his three main rivals Warren, Joe Biden and Pete Buttigieg. He retains a loyal base, a valuable asset in a crowded field that could split the Democratic vote.

Yet Democratic strategists say he is still being underrated.

“Folks who think he can’t win are either not paying attention or are in some kind of crazy denial,” Rebecca Katz, a progressive Democratic strategist, wrote on Twitter. Dan Pfeiffer, a former senior adviser to President Barack Obama, said Sanders has the “best chance” to sweep the first three states and that his odds are “underestimated and under-discussed.”

Even so, the obstacles that impeded him in the past remain. Sanders’ support is concentrated among young people, who are less reliable voters. His self-identification as a democratic socialist is a turnoff for moderate Democrats and older voters who turn out more consistently.

And while polls show him performing about as well as Biden in head-to-head matchups against Donald Trump, some Democrats harbor doubts about his “electability.”

But even if he comes up short, Sanders’ durability could earn him a kingmaker role when it comes to influencing the policy agenda of the nominee — and the official Democratic Party platform at the 2020 convention in Milwaukee. The nominee would risk a similar fate to Hillary Clinton’s in 2016 if younger and disaffected voters who favor Sanders fail to turn out. One way to avoid that outcome is a strong Sanders endorsement, which might mean adopting some of his progressive ideas.

Sanders’ campaign manager, Faiz Shakir, said the Ocasio-Cortez endorsement — which landed shortly after Sanders’ heart attack in early October — was “a big moment” in the campaign that “gave him a lift” and prompted other prominent figures to consider supporting him. Two other first-term Democrats who have generated enthusiasm on the left — Rashida Tlaib and Ilhan Omar — also backed him.

Sanders has benefited from Warren’s stumbles on the Medicare for All legislation that he crafted, which corresponded with her recent drop in polls. She initially embraced it without equivocation but later distanced herself by saying she would defer its implementation until her third year in office, a move that sparked some criticism from the left.

Shakir said Sanders is “the last man left on the island” who’s clearly backing Medicare for All, which has robust support among voters. A Kaiser Family Foundation poll in November showed that three-quarters of Democrats “strongly favor” or “somewhat favor” the proposal, which would create a government-run health care system that abolishes private insurance.

“We started the campaign with a lot of people together for Medicare for All. But everyone else has either evolved, moved, modified their stances on the damn bill he wrote,” he said. “It has only clarified in everybody’s minds that Bernie Sanders is consistent and reliably a fighter for Medicare for All.”

Sanders’ path to the Democratic nod is tricky, but there’s an opening if Biden loses in both Iowa and New Hampshire.

Then, said former Clinton aide Brian Fallon, black voters in South Carolina who are now firmly backing the former vice president might be looking for an alternative, and Sanders and Warren might be able to pick up some of that support. Buttigieg, who barely registers among black voters, is probably too far behind to benefit much, Fallon said.

Sanders always can rely on a base of supporters that will “hang with him through thick or thin,” said Democratic strategist Joe Trippi, though he expressed some doubt whether Sanders can push too much beyond the 20% to 22% range in such a crowded field.

But Trippi said the early contests have a history of unpredictability. That’s especially true in Iowa where in virtually every instance the national Democratic front-runner at this point in the race has never been the victor. Trippi was the campaign manager for Howard Dean in 2004, who led early surveys there but fell toward the end and lost the caucuses.

He warned against counting out Sanders. “It’s very dynamic in Iowa,” Trippi said.

(Michael Bloomberg is also seeking the Democratic presidential nomination. Bloomberg is the founder and majority owner of Bloomberg LP, the parent company of Bloomberg News.)

To contact the reporters on this story: Sahil Kapur in Washington at skapur39@bloomberg.net;Laura Litvan in Washington at llitvan@bloomberg.net

To contact the editors responsible for this story: Wendy Benjaminson at wbenjaminson@bloomberg.net, Max Berley

©2019 Bloomberg L.P.