Bernie Sanders attends a rally in California in May. (Agence France-Presse via Getty Images)

SANTA MONICA, Calif. — Bernie Sanders gave the crowd of die-hard supporters what they wanted. “The struggle continues,” Sanders declared to thunderous applause as he vowed to remain in the Democratic presidential race.

The senator’s dramatic promise to carry his campaign to the party’s national convention in Philadelphia came hours after rival Hillary Clinton laid claim to the nomination late Tuesday after primary victories in states that included California.

But Sanders refused to accept Clinton as the only Democratic standard-bearer. He said he will contest her in the upcoming primary in Washington, D.C., and seek to push his party leftward.

Sanders now enters a period of protracted bargaining with Clinton and Democratic leaders, who are eager to see the party unite but also remain acutely aware that Sanders commands a powerful base of support.

[Next up for Democrats: Finding the same page]

In the coming days, both sides will engage.

After flying Wednesday morning to Burlington, Vt., for a brief stay at home, Sanders is scheduled to meet with President Obama and Senate Minority Leader Harry M. Reid (D-Nev.) on Thursday in Washington. He then plans to hold a rally.

As they mingled past midnight at the hotel bar at Sheraton Universal Hotel in Los Angeles, several Sanders associates said they see no reason for him to rush out of the race. They argued that Democrats would eventually come together — but only after Sanders is assured that the party agenda will include chunks of his own.

That process could take weeks to resolve. Sanders’s confidants described him as willing to endure taunts and complaints until he is satisfied that the party is properly responding to — and respecting — his political capital.

Sanders will move forward with a shrunken team. As the primary election season all but comes to an end, an official said Sanders plans to shed about half of his campaign staff starting Wednesday, mostly in advance and field operations.

Yet as Sanders, 74, confronts a complicated future — and the pain that comes with a campaign’s likely end —  he also enjoys seeing his ideas burst into the mainstream. After decades of toiling as a little-known New England socialist, he has become a Democratic folk hero for re-energizing the progressive coalition that dominates the party’s younger ranks.

Taking the stage on Tuesday to Bruce Springsteen’s “We Take Care of Our Own,” Sanders basked in the adulation of more than 3,000 supporters gathered in an airplane hangar in Santa Monica. Swelling cheers lasted nearly three minutes as the hoarse senator said “thank you” and waved from his lectern.

“They’re with you,” Jane Sanders whispered to her husband. “They’re still with you.”

Once the crowd settled and the light blue “Bernie” signs were lowered, Sanders grinned and thanked his supporters for “being part of the political revolution,” which set them off again.

[How much does Clinton really need the Sanders's bump?]

So it went for the rest of his 18-minute speech, which was far shorter than his usual remarks, but as fiery as he has ever been.

“Next Tuesday, we continue the fight in the next primary, in Washington, D.C.,” Sanders said. “And then we take our fight for social, economic, racial, and environmental justice to Philadelphia, Pennsylvania.”

“I am pretty good in arithmetic, and I know that the fight in front of us is a very, very steep fight,” he added. “But we will continue to fight for every vote and every delegate we can get."

The Sanders faithful went wild.

Sanders wore his usual uniform: dark suit, blue shirt, blue tie and a gold Senate pin on his lapel. The cavernous hangar almost vibrated at times, its metal ceiling amplifying the raucous scene below.

Looking toward November, Sanders took repeated shots at Donald Trump, the presumptive Republican nominee.

“The American people, in my view, will never support a candidate whose major theme is bigotry," said Sanders. "Who insults Mexicans, who insults Muslims and women and African Americans. We will not allow Donald Trump to become president of the United States.”

Sanders then turned to the tenets of his stump speech, knocking the “billionaires buying elections” and the “rigged” financial system, and touting universal health care.

Setting up the stakes for his next step, Sanders mentioned that he spoke earlier in the evening with Obama and Clinton. He noted that he had “a very gracious call” with the former secretary of state and congratulated her on her victories.

But boos flew at the mere mention of Clinton’s name, a sign of her striking unpopularity with some of the senator’s hard-core supporters. Sanders paused and raised his arms as if to quiet them, but did not chastise them.

Beyond the hard politics and his populist pitch, a sense of wistfulness touched parts of Sanders’s speech.

“You all know that it is more than Bernie — it is all of us together,” he said.

Sanders called his recent campaigning in California, where he has been swarmed at every stop by hundreds of people, "one of the most moving moments of my life."

Hours earlier, Sanders had greeted hipsters in the Silver Lake neighborhood of Los Angeles, were he slowly strolled through a farmers’ market, drawing people out from nearby bars and cafes to run up for a handshake. Before that, there was a stop on Hollywood Boulevard, where tourists from around the world ignored the stars at their feet and rooted for him.

“When we began this campaign a year ago, we were considered to be a fringe campaign,” Sanders said dismissively, adding air quotes for emphasis. “But over the last year, I think, that has changed just a little bit.”

The crowd, as ever, roared.