Barack Obama in Ohio on Friday. NBC News

President Barack Obama unleashed a blistering attack on Donald Trump, the Republican presidential nominee, during a rally in Cleveland on Friday.

Obama ripped into Trump's past comments about women, Mexican immigrants, and Muslim-Americans.

"You don't have to be a husband or a father to know that kind of language, those kinds of thoughts, those kind of actions, are unacceptable," Obama said. "They're not right."

Obama questioned why prominent Republicans like Sens. John McCain of Arizona and Kelly Ayotte of New Hampshire were backing away from Trump only after the public release last week of a 2005 tape in which Trump bragged about being able to grope women.

"You said you're the party of family values," Obama said of the Republican Party. "What, you weren't appalled earlier when he was saying degrading things about women? When he was judging them based on a score, of, are they a 2 or a 10?"

"If you're doing it just for political expedience because you're looking at poll numbers and you say, 'This might get me in trouble,' that's not enough," Obama said.

He accused elected Republican officials of "standing by" and letting "crazy talk" — like Obama being born outside the US — dominate conservative media.

Obama linked the propagation of conspiracy theories to Trump's rise.

"That's what allowed Donald Trump suddenly to emerge," he said.

Business Insider's latest electoral-projection map has Clinton up 316 electoral votes to Trump's 187, including states that lean Democrat. Trump is up by 1 percentage point in Ohio — the battleground state is still in play.