BERKELEY — Sen. Bernie Sanders electrified a rally full of Berkeley liberals on Saturday, urging voters to turn out for what he called the most important midterm election in history and showing he still commands a fervent following as he considers another presidential bid.

“I know the World Series is important, I got it. But you know what? This midterm election is a thousand times more important,” he thundered in front of about 2,500 people at the Berkeley Community Theater. “Tell your friends and family to turn off the damn television and come out and fight for democracy.”

Campaigning alongside East Bay Congresswoman Barbara Lee, the Vermont senator returned to some of the greatest hits from his underdog 2016 presidential campaign, railing against corporate greed, income inequality and the influence of big money on politics. And he marveled at how many of his policy planks, from free college to single-payer health care, have been absorbed into the Democratic Party’s mainstream thought.

He also denounced the shooting in Pittsburgh that left at least 11 people dead at a synagogue Saturday morning, calling for stronger gun control laws and telling those at the rally, “We have got to end that hatred, that bigotry that is sweeping this country.”

Sanders’ Berkeley appearance caps a nine-state cross-country tour campaigning for midterm candidates. He stumped in Southern California on Friday for Mike Levin, a Democratic environmental lawyer running in a closely watched GOP-held seat.

But Levin has led recent polls by double digits, and Sanders made no appearance in any other of California’s half-dozen most competitive races, which could decide whether Democrats win back control the House.

Most of those races are on historically Republican turf in Orange County and the Central Valley, and campaigning alongside the most prominent democratic socialist in America may not have helped Democrats gain ground among GOP and independent voters.

One Democratic congressional campaign strategist in Southern California, who asked not to be named in order to speak candidly, said Sanders’ team had not reached out to offer his presence in their competitive race.

“There is a concern that in more moderate districts he doesn’t mesh well,” the strategist said. “He’s got his own campaign agenda.”

Instead of stumping in California’s most important races, Sanders appeared with Lee, who represents what she describes as “the wokest district in the country.” Her opponent in next month’s election is Green Party hopeful Laura Wells, who got 0.5 percent of the vote in the June primary as a write-in candidate. Lee won 99.3 percent.

Sanders acknowledged that Lee would “probably swing out a victory here in Berkeley.”

“I want you to help Democratic candidates all over this state,” he told the crowd. “California can make the difference.”

One reason for Sanders’ visit may be the 2020 presidential race: He campaigned in Iowa last weekend and is considering taking another swing at the White House. He would need to count on strong support from ardently liberal Berkeley in California’s primary.

The Golden State primary will be especially influential in next cycle’s presidential nomination campaign, thanks to its early spot on the calendar and the state’s liberal early voting rules. Millions of mail-in primary ballots will be sent out to voters starting Feb. 3, 2020, the same day as the traditionally first-in-the-nation Iowa caucuses.

The crowd broke into a minute-long standing ovation after someone shouted “2020!” in the middle of Sanders’ speech.

Sanders sure sounded like a presidential candidate, concentrating much of his fire on Trump, who he described as a “pathological liar.”

“Given that Trump and his friends are attacking California every day, you guys must be doing something right,” he said to cheers.

Sanders’ enthusiastic support for Lee could also be a boost for the 10-term congresswoman as she runs for House Democratic caucus chair, the fourth-highest position in the party’s leadership.

“You are the revolution that will bring real progressive leadership and policies up and down the ballot,” she told supporters.

Sanders also appeared onstage with Jovanka Beckles, a progressive Richmond City Council member in a competitive Democrat-vs-Democrat East Bay State Assembly race. She’s running against Buffy Wicks, a former Barack Obama and Hillary Clinton strategist who has the backing of most of California’s Democratic establishment (and who won the nickname “Buffy the Bernie Slayer” during Clinton’s 2016 primary campaign).

Jeff Weaver, one of Sanders’ top strategists, said the senator met with Beckles and had a “great conversation” this weekend, but was not endorsing her now.

The Sanders faithful left the theater Saturday debating whether he should run again in 2020.

“He is the direction we need to be moving,” said Leilei Shih, an oceanographer from Mountain View who backed Sanders in the 2016 primary. “I’d be over the moon to see a Bernie Sanders-Kamala Harris ticket.”

Kiana Gums, a 22-year-old activist from Oakland, said she liked Sanders but wasn’t sure he was the right fit.

“The Democrats need to nominate whoever has the best chance to win, because we are in crisis mode right now,” she said. “We need to turn our outrage into real change.”