Sen. Bernie Sanders, I-Vt., ripped into President Trump during Wednesday's episode of "The View" and claimed that he was probably the "most dangerous" president in the history of the United States.

His comments came after host Joy Behar asked him about House Speaker Nancy Pelosi, D-Calif., seemingly preferring a moderate to challenge Trump in 2020.

"I love Nancy but she and I disagree on this issue," Sanders said. "I think the way you beat Donald Trump — and I must say that in my view, Donald Trump is the most dangerous president probably in the history of this country."

"We agree," Behar chimed in, as Sanders set off a round of applause from the audience.

Sanders indicated that while he was typically open to compromise, that could be difficult with Trump in office.

SANDERS SWIPES AT BIDEN AFTER VAGUE ANSWER ON WHY HE'S RUNNING: BEATING TRUMP IS 'NOT ENOUGH'

"I work[ed] with your dad, I work with other people on issues where we can come together," he told co-host Meghan McCain, referring to the late Sen. John McCain. "That's what I think American politics is supposed to be about. But you have a president today – and again, it gives me no joy to say this – he is a pathological liar."

Since taking office, Trump has been compared to former Presidents Andrew Johnson and Andrew Jackson. Johnson, an open racist, was impeached by the House after the Civil War, while Jackson has come under fire for his treatment of Native Americans. Thousands of Native Americans died in his infamous "Trail of Tears" that forcibly relocated them from the southeastern United States.

CLICK HERE TO GET THE FOX NEWS APP

Sanders and the president have traded jabs online, with Trump regularly calling the senator "crazy." Sanders told "The View" that the label was ironic given Trump's mental state.

The Vermont senator, also a champion of "democratic socialism," touted his own agenda as the most "progressive" of any of the "serious" presidential candidates in U.S. history.