The Democratic race could yet take unpredictable turns, and his campaign is vowing to win. If Mr. Sanders beats Mrs. Clinton in her adopted home state, New York, on April 19, he could raise damaging questions about her candidacy and gain more momentum. But he would still need to win a landslide victory there and in Pennsylvania, California and other states to overtake her in delegates this spring. For Mr. Sanders, the missteps of 2015 and early 2016 — leading to his delegate deficit — are the greatest drag on his recent success.

Bob Kerrey, a former Nebraska governor and senator who ran for the Democratic nomination in 1992 and who has endorsed Mrs. Clinton in the current race, said Mr. Sanders might be winning now if he had relentlessly pressured Mrs. Clinton since last fall over her closed-door speeches to Wall Street banks, her role in the finances of Clinton Foundation programs, and other vulnerabilities. Mr. Sanders did not raise the paid-speech issue, after long resistance, until late January.

“Making the transcripts of the Goldman speeches public would have been devastating” to Mrs. Clinton, Mr. Kerrey said. “When the G.O.P. gets done telling the Clinton Global Initiative fund-raising and expense story, Bernie supporters will wonder why he didn’t do the same.”

Part-time and Unknown

Competing aggressively against Mrs. Clinton in 2015 was not part of the Sanders strategy when he announced his candidacy last April. Rather, in early campaign planning meetings, Mr. Sanders made it clear that he was focused on bringing his liberal message to cities and towns across America while also fulfilling his duties in the Senate. Advisers said they warned him about the travel demands that a serious presidential bid would entail. They noted that Mrs. Clinton, who had left the State Department, would be working around the clock to campaign, raise money, nail down endorsements and develop policy plans.

But Mr. Sanders did not intend to match her schedule. He never considered resigning his seat, advisers said, and he thought he could compete effectively by campaigning about three days a week while the Senate was in session and then making weeklong trips when Congress was on break. As a result, he had limited time to campaign in crucial states like South Carolina; he canceled a visit to Charleston in mid-June after the church shootings there, and he did not return to the city until late August.