NORTH CHARLESTON, S.C. — Former vice president Joe Biden has slipped in the polls, faced a fusillade of attacks from President Trump and his allies, and seen his own advisers downplay his chances in the earliest primary states, all in the past few weeks.

But contrary to the expectations of analysts, the fears of supporters and the hopes of rivals, Biden maintains a sizable loyal following. Nowhere is that more evident than in the African American community, recent interviews suggest, especially in states like South Carolina, which holds a crucial early primary.

Martha Beck, a retired high school teacher from Charleston who volunteered last weekend at the Blue Jamboree, an annual Democratic gathering, said she is enamored with several of the Democrats, but believes Biden would be most likely to defeat Trump.

She gushed about Sens. Elizabeth Warren (D-Mass.) and Bernie Sanders (I-Vt.) but said Sanders is “too old and grumpy and he just shouts at people all the time.” And she doesn’t think the same country that elected Trump would put Warren, or any other woman, in the White House four years later.

“I don’t think a woman would win,” said Beck, 68. “I just saw how they beat up on Hillary Clinton, and I’m afraid they’re going to do the same thing to [Warren].”

Johnny James, 53, of Hampton County, S.C., said that despite Warren’s ability to attract big crowds, he prefers Biden. “He’s already seasoned,” James said. “He knows the Washington game.”

Republicans have stepped up their attacks on Biden in recent weeks, noting that his son Hunter sat on the board of a Ukrainian company while Biden was spearheading the Obama administration’s Ukraine policy. But many Democrats continue to consider Biden to have the best chance of defeating Trump, and for a significant portion that is the overriding factor.

Shedron Williams, a state representative from Hampton, S.C., predicted that “Biden is going to do well in South Carolina.” Williams has not endorsed the former vice president, but said he continues to be popular among black voters.

“Whoever is going to win South Carolina, it’s going to take the African American vote,” Williams said.

Polls back up that contention. In South Carolina, 37 percent of Democrats in a recent CNN poll said they support Biden, who leads Warren by more than 20 percentage points in the state.

The ongoing support for Biden has emerged as one of the campaign’s central story lines, even as he’s come under attack from rivals such as Sen. Kamala D. Harris (D-Calif.) for his onetime work with segregationists, and as former Housing secretary Julián Castro has made comments that struck some as questioning Biden’s mental acuity.

Some of Biden’s rivals hope that if he stumbles in the Iowa caucuses or the New Hampshire primary, Democrats in states like South Carolina, which votes a short time later, will reconsider their support.

But James noted that South Carolina is the first primary state with a significant number of African American voters and said he would consider Biden the best candidate even if he doesn’t win any primary states before South Carolina.

“You can come in second and still be stronger than the first horse,” James said. “Even if someone else wins [Iowa or New Hampshire], that doesn’t say how you’ll do with black voters.”

Biden over his career has forged strong ties in South Carolina and especially with African Americans, who make up nearly two-thirds of Democratic primary voters in the Palmetto State. He frequently vacations on Kiawah Island, a spot in the lowcountry near Charleston where residents got a semiannual glimpse of the vice presidential motorcade.

Biden also has decades of relationships with South Carolinians. He counts Rep. James E. Clyburn (D-S.C.) as a close friend. At Clyburn’s annual fish fry in June, a South Carolina mainstay for those who want to be president, Biden shook hands and took photos along a rope line until nearly midnight. He was the last presidential candidate to leave.

Maria Washington, 64, of Charleston, said she was a Biden fan well before then.

“I’m ride or die Biden,” she said as she ate a barbecue lunch Saturday at the Blue Jamboree. “I look at each of them and what they have done. . . . Biden has been on an even keel for 40 years.”

Washington’s friend, Hermine Hawkins, who like Washington is black, said her questions about whether Biden would be good for African Americans were answered when President Barack Obama selected him as a running mate.

“If Barack Obama pulled him on his team, there’s some validity there,” she said.

Still, critics have been particularly vocal in recent weeks, and Biden has faced threats to his presidential aspirations from multiple fronts.

On Wednesday, Biden called for Trump’s impeachment, using his strongest language yet, in an offensive that came as Trump has inundated Twitter with false claims about the Bidens and Ukraine. That same day, the president’s reelection campaign announced a $10 million ad buy targeting Biden and focused on early-voting states.

Meanwhile, Warren has gained strength, sometimes attracting large crowds to her events, something Biden has struggled to do.

But those setbacks have not significantly dented Biden’s support. That’s in large measure because his closest rivals, Warren and Sanders, have had trouble winning the backing of black voters.

For Biden’s Palmetto State supporters, the question is whether he can win there in a way that propels him for the contests that follow. The Feb. 29 South Carolina primary is followed on March 3 by Super Tuesday, featuring a diverse slate of 16 states that includes North Carolina, Alabama and California.

Williams, the state representative, predicted that Biden’s success in South Carolina “is going to send a message to the rest of the country.”