Vermont Sen. Bernie Sanders (I) on Friday defended voters of President Trump, saying that the election was Democrats' to lose and that the party needs to better represent the working-class voters who supported Trump and other GOP lawmakers

"Some people think that the people who voted for Trump are racists and sexists and homophobes and deplorable folks. I don't agree, because I've been there. Let me tell you something else some of you might not agree with, it wasn't that Donald Trump won the election, it was that the Democratic Party lost the election," Sanders said while speaking at an Our Revolution rally in Boston with fellow Sen. Elizabeth Warren (D-Mass.).

Sanders went on to say that a "fundamental restructuring of the Democratic party" was needed to win future elections and that problems with party's current setup is why many were quick to support Trump in the election, not because of some of the rhetoric on the campaign trail.

"We need a Democratic Party that is not a party of the liberal elite but of the working class of this country, we need a party that is a grassroots party, where candidates are talking to working people not spending their time raising money for the wealthy and the powerful," Sanders said. "And when we do that, when we transform the Democratic Party, we transform America."

Sanders said most people believe in a progressive agenda, not a right-wing agenda.

At the start of his speech, Sanders also offered praise for Warren, saying that "you can tell the quality of a person by the enemies she makes, and to her credit Elizabeth Warren has made some wonderful enemies."

Sanders said those enemies include Wall Street and the pharmaceutical and fossil fuel industries, and he encouraged voters to keep her in the Senate to fight for a progressive agenda.