In recent weeks, Mr. Sanders has been rapidly closing the gap between himself and Ms. Clinton.

With the bright California sun beating down on their faces, the 12,000 people gathered in a square in downtown Oakland heard Bernie Sanders make a bold prediction.

“I don’t want to add to Secretary Clinton’s anxiety”, he shouted in a hoarse voice, “but if you promise not to tell her — we’re going to win here in California”. The crowd, squinting in the sunshine, chanted “Bernie! Bernie! Bernie!” The speech was briefly interrupted when several people, apparently animal rights activists, rushed the stage. They were taken into custody by the secret service.

California campaign

Mr. Sanders has been on a punishing schedule of campaigning across California in the last week, speaking to large and ebullient crowds in packed rallies. Hillary Clinton, because of the more than 500 super-delegates who have pledged to her campaign, is thought to have the nomination almost locked down — but a big win in California for Mr. Sanders would be a serious problem for her.

Mr. Sanders, in Oakland, radiated confidence. “We will go into the convention with a great deal of momentum,” he said, “and we will come out with the nomination”. “The point I will be making to the Democratic National Convention is that in virtually every single poll, we do better against Donald Trump than secretary Clinton. So if we want a campaign that will make sure the disaster that is Donald Trump does not become President — we are that campaign.”

Earlier, at a community conversation event at a baptist church in East Oakland, Mr. Sanders hit out at the presumptive Republican nominee, who recently said at an event in Fresno that “there is no drought” in the drought-stricken State.

He called Mr. Trump, with acid sarcasm, “one of the great meteorologists of our age”. He also struck out at Ms. Clinton over her position on the Puerto Rican economic crisis.

“As has happened many times before, Secretary Clinton has changed her mind and is inching closer to positions I have taken,” Mr. Sanders said in a press release, “but what she says only days before Election Day in Puerto Rico is too little, too late”.

In recent weeks, Mr. Sanders has been rapidly closing the gap between himself and Ms. Clinton, with recent polls putting him well within the margin of error for victory in California.

Jeff Weaver, Mr. Sanders’s campaign manager, has told The Guardian that the intensive campaigning by Mr. Sanders can make a huge difference here. In Oakland, Mr. Sanders reiterated his economic message. “I have seen the empty lots and abandoned storefronts all over this country,” he said in the Allen Temple church. “Don’t think Oakland is alone.” — © Guardian Newspapers Limited, 2016