Speaking in San Rafael on Friday night, Bernie Sanders told a crowd of more than 850 people that they shouldn’t blame many of the people who voted for Donald Trump for his presidential victory.

The Vermont senator said they should blame instead the elite leadership of the Democratic Party, which for years did too little to address the economic pain of an increasingly large segment of the nation.

“I look at this election not as a victory for Mr. Trump, who wins the election as the most unpopular candidate in perhaps the history of our country,” Sanders said. “But as a loss for the Democratic Party.”

The event, held in Dominican University’s Angelico Hall in conjunction with Corte Madera’s Book Passage, was designed to promote Sanders’ new book, “Our Revolution: A Future to Believe In.” Sanders barely mentioned the book, however. As he did during his bid for the Democratic presidential nomination, Sanders concentrated instead on the issue that has energized him throughout his political career: economic inequality. He said he doesn’t believe that all of the people who voted for Trump are racists or sexists or homophobes.

“I don’t believe that at all,” Sanders said. “I think a lot of people ended up holding their noses and voting for Trump because they are in pain.”

He provided a few choice examples of that pain. For example, he noted the fact that millions of Americans still lack health insurance and that many people with insurance have high deductibles that discourage them from seeing a doctor and can’t afford the medicine they’re prescribed if they do consult a physician.

Sanders said that half of people age 55 have no money saved for retirement, that on average men in Virginia’s affluent Fairfax County live 18 years longer than men in the state’s economically disadvantaged McDowell County, and that tens of thousands of people living in Baltimore, Maryland, are addicted to heroin.

“There are a lot of people in our country who are hurting and they are hurting very, very badly,” Sanders said.” The political establishment is not hearing their pain; the financial and economic establishment could care less about their lives; and the media establishment is not dealing with the reality of their lives; and along comes Mr. Trump.”

But Sanders said voters who believed Trump when he told them he was going to make their lives better are going to be disappointed.

“It appears we’re going to be governed by tweets, a new form of government, 140 characters or less, and there we go,” Sanders said.

For people who are distressed by Trump’s election, Sanders had some disturbing news: things could get worse if campaign finance laws are weakened further.

“The reality is that this country both politically and economically is moving toward an oligarchic form of society where a small number of very wealthy and powerful people control our economy and our political life,” Sanders said.

“So what we have to do,” Sanders said, “is create a strong grassroots movement where we bring people together to fight not only for social justice, not only for environmental justice, but for economic justice as well. But here is where it becomes difficult.

“It is very easy for many Americans to say, I hate racism, I hate homophobia, I hate sexism,” Sanders said, “but it is a little bit harder for people in the middle or upper middle class to say, maybe we do have to deal with the greed of Wall Street.

“One of the things I’m trying to do,” Sanders said, “is to figure out a way to radically transform the Democratic Party from a party led by a liberal elite to a party led by working people and young people and people who really want to transform society.”

If attendance at Sanders’ book tour appearances is any indication, he will have no trouble recruiting foot soldiers in his bid to revamp the Democratic Party.

Karen West, Book Passage’s events director, said tickets to the San Rafael event sold out in six hours and the store stopped adding names to the waiting list when it reached 700. Earlier Friday, Sanders spoke to about 2,000 people during a sold-out appearance at UC Berkeley’s Zellerbach Auditorium.

“He’s the guy I find that is speaking the truth. He really cares about the people,” said Richard Ehret of Sausalito, 70, who attended the San Rafael event with his daughter and a group of her friends.

“I’m a supporter of Bernie’s, and I voted for him. I like how he’s really for the people,” said Analisa Duharte, 18, a Dominican University freshman.

“I wanted to find out how we’re going to survive the age of Trump and maintain a progressive agenda,” said Rendell Bower of San Rafael, who attended the event with his partner, Lisa Haydon, who said she supported Hillary Clinton.

“I supported the person who was most likely to win,” Haydon said. “Unfortunately, I guessed wrong.”