Joe Biden was in the car on the way to a Democratic gala in Atlanta on Thursday night when he turned to an aide and asked for a pen. The former vice president began scrawling his evolving thoughts on the Hyde Amendment, preparing to make one of the biggest shifts of his 2020 presidential campaign.

Later that night, reading from those notes and diverting from the prepared teleprompter text, he would reverse a position he had held for nearly four decades and for the first time call for repealing the federal law that sharply restricts the use of taxpayer money for abortion. It was the culmination of days of debate within his campaign and external criticism over an issue that has become fundamentally important for the Democratic Party.

It concluded the rockiest week of his campaign, one in which he struggled in the limelight after a period in which his campaign performed more smoothly than many Democrats had expected. He has been attacked for his vote on a 1994 crime bill, criticized for avoiding multicandidate events, and came under fire when his campaign lifted lines unattributed for use in his policy documents. None of the stumbles are fatal in themselves, but allies express concern that when they are considered together, Biden could begin to undermine his campaign’s central argument: that he has the best chance of beating President Trump.

“Democrats see him as a strong candidate against Trump; polls have confirmed that. But the way he runs his campaign affects his electability argument,” said Neera Tanden, the president of the liberal Center for American Progress. “Many successful campaigns have missteps, but a series of them may well hurt the electability case.”

Biden’s campaign has drawn strength so far from the conviction among a broad section of the electorate that he is best positioned to defeat Trump. Early polls in the industrial Midwest find him easily beating Trump in hypothetical matchups, and a recent Quinnipiac University poll found Biden beating Trump by four points in Texas, usually safely Republican territory, even as Trump won hypothetical contests against other Democratic candidates.

“I have not seen any faltering on any part by folks who say they are going to support Biden,” said South Carolina state Sen. Dick Harpootlian (D), one of the vice president’s top boosters in the state. “Again, what is driving this is who is going to beat Donald Trump. Everybody believes Joe Biden has the best chance of doing that in 2020. The rest of these folks are untried.”

But there are ample precedents for an aura of electability to wear off over the grueling course of a campaign, particularly among candidates unable to deftly adjust to their party’s changes. Hillary Clinton faltered in her 2008 presidential campaign by wavering on issues such as driver’s licenses for undocumented immigrants, giving her rivals opportunities to present her as a tentative leader.

Biden has a long political record filled with positions that could hamstring his campaign in the coming months, including several issues that his rivals have already begun to target. Sen. Bernie Sanders (I-Vt.) has criticized Biden for supporting free-trade deals, and Sen. Elizabeth Warren (D-Mass.) has hit him for siding with the banking industry on bankruptcy legislation.

Biden voted for the Iraq War in 2002 — something he later said was a mistake but which led another opponent, Rep. Seth Moulton (D-Mass.), to add a reference to it as he tweaked Biden on his abortion reversal Friday. Biden has declined to back away from his support for the North American Free Trade Agreement. Unlike most candidates in the race, he says he does not support the federal legalization of marijuana but thinks possession of the drug should be decriminalized. He was also a supporter in the Obama White House of an effort to allow religious institutions to opt out of the contraception mandate included in the Affordable Care Act — an issue his campaign has declined to speak about since he announced his presidential candidacy.

During a recent visit to Nashua, N.H., Biden argued that the 1994 crime bill he wrote had not generated mass incarceration, prompting a swift response from rivals who pointed out that the bill offered clear incentives for states to build more prisons.

The challenge for Biden is to balance the political realities of the Democratic primary electorate with his own desire to cast himself as campaigning away from the larger pack of Democratic candidates. For the first weeks of his campaign, Biden has parried on many of these topics, as his aides have argued that the debate among liberal activists on Twitter and cable television does not reflect what they see as the moderate core of the Democratic Party.

He has so far kept a light public campaign schedule, largely avoiding the news media, even as other candidates have made themselves available as part of their daily schedules. When 19 presidential candidates gather Sunday in Iowa for a state party event, Biden plans to be in Washington attending the graduation of a family member.

The debate over the Hyde Amendment burst into public view on Wednesday when the Biden campaign reaffirmed to NBC News that the former vice president still supported the prohibition on federal funding of abortion, with the exception of rape, incest or danger to the life of the mother.

The campaigns of Bill Clinton in 1992, Barack Obama in 2008 and Hillary Clinton in 2016 said they supported a repeal of Hyde, though all signed or voted for legislation that included the provision. In a reflection of the recent leftward pull of the party, Biden was immediately criticized by a range of abortion rights groups, and phones started ringing with complaints.

“Everybody called,” said one adviser, who like other Biden aides spoke on the condition of anonymity to discuss internal campaign deliberations. “All the people called. Everyone called.”

As soon as she saw the report, the actress and liberal activist Alyssa Milano called Biden campaign manager Greg Schultz.

“I said, ‘This is not okay,’ ” Milano said in an interview. “ ‘And I’m going to have to publicly say something.’ ”

Biden still backed the amendment at that time, advisers say, but the campaign was also in the midst of a debate over health-care policy. Internally, some advisers were arguing that Biden’s policy needed to account for coverage of abortion, particularly for low-income women.

Advice to Biden within the campaign was mixed. Some urged him to abandon his support for the amendment — pointing out that it was a barrier to health-care access for poorer women — while others said he should not change a view he had held for decades.

“The question became how do we take care of low-income women and women of color that wouldn’t be covered with the Hyde Amendment in place?” one of the advisers recalled.

“From the VP’s perspective, he’s a man of deep faith” who has wrestled with the subject of abortion, the adviser added. “But I do think, lay the question on the table, what can we do? ‘Sir, we can repeal the Hyde Amendment.’ ”

Advisers resisted any notion that Biden changed his mind solely because of political pressure, and they insist that his views shifted in recent days.

“If he wanted to go with political whims, he would have come out for Medicare-for-all and apologized for the crime bill,” one adviser said. “That is not what he has done, because it’s not what he believes. But this is something he believes.”

There is ample early evidence that Democratic voters’ focus on denying Trump a second term may make policy positions less determinative in the 2020 primaries than in past primary contests.

A Monmouth Poll in late January found that 56 percent of Democrats would prefer to back a stronger candidate against Trump, even if they do not agree on issues, than a weaker candidate who aligns more with their beliefs. A similar question asked of New Hampshire Democrats in May found 2 in 3 saying that beating Trump was more important.

In 2016, sentiments ran the other way.

A warning sign for Biden supporters loomed in the candidate’s seeming inability to recognize the importance the Democratic base has placed on abortion rights as Republicans have fought to diminish them.

On Wednesday night, Rep. Cedric L. Richmond (D-La.), Biden’s campaign co-chairman, launched a strong defense of Biden, saying on CNN that “he is guided by his faith. His position on the Hyde Amendment has been consistent.”

The next day, Richmond called the reversal “a profile in courage.”

“I thought he took in today’s climate and the world how it is and not how we want it to be,” Richmond said.

Milano has not endorsed any candidate, but she has offered advice to Biden.

“I have tried to be very honest with Joe about how I feel and how he needs to grow in this time to meet the demands that the party has evolved on these issues,” she said. “He’s showing that he can listen to women throughout the country who made their voices heard on why he was wrong in taking this stance.”

“His ideology is changing,” she said. “He’s progressing.”

Milano attended the speech in Atlanta and cheered when Biden announced that he opposed the Hyde Amendment.

She approached him afterward backstage.

“I’m proud of you,” she recalled telling him. “Thank you for doing this.”

“He said, ‘You don’t have to thank me,’ ” she said. “ ‘This is the right thing. It would be unfair for women everywhere to hold this stance on this issue.’ ”