Mr. Uygur’s long history of comments about women included ranking them on a scale of 1 to 10, based on how likely men would be to have them perform oral sex. He also defended a similar ranking by Harvard’s men’s soccer team, which was widely condemned at the time.

Sign up for On Politics to get the latest election and politics news and insights. Sign up for our politics newsletter

Mr. Uygur, a longtime supporter of Mr. Sanders, has also disparaged former President Barack Obama on his show, argued that bestiality should be legal and hosted white supremacist figures, including David Duke. In one clip that circulated on Twitter, Mr. Duke ends an interview by saying, “I am not, what you call a racist,” to which Mr. Uygur replies sarcastically, “No, of course not.”

Mr. Uygur called the clip a “complete smear” that had been taken out of context from a combative one-hour interview in which he pushed back on Mr. Duke.

He said he had already apologized for and disavowed many of his past statements, and called the criticism he was facing “incredibly unfair, driven by the corporate Democrats and to some extent corporate media.”

Ms. Smith has mostly declined to comment on Mr. Uygur’s past remarks, which have repeatedly resurfaced in local press. But last month, she told The Washington Post: “I’m not sure how to rank what is most damning of his commentary, but the most disqualifying to me was the night of the Saugus High School shooting when he boasted about his fund-raising totals while I was with grieving families and students. He is not fit to serve anywhere, least of all a district where he doesn’t even live.”

Several liberal groups in California have condemned Mr. Uygur, and Mark Gonzalez, the chairman of the Los Angeles County Democratic Party, had called for Mr. Sanders to withdraw his endorsement.

“This man has spent decades, including up until recently, attacking women, the LGBTQ community, Jews, Muslims, Asian-Americans and African Americans,” he said in a statement. “His vulgarity, his hate speech and divisive rhetoric have no place in our party.”