MANCHESTER, N.H. — Sen. Bernie Sanders said Friday that Democrats will need “the largest voter turnout in the history of this country” to beat President Donald Trump in November, and promised that all of the Democratic candidates will unite behind the eventual nominee to make that possible.

Speaking at a Politics and Eggs breakfast at St. Anselm College, Sanders said Democrats will need to mobilize ”not only the people who traditionally vote,” but also the large number of people “who do not vote or vote infrequently.”

Noting the millions of small dollar donations his campaign has collected, Sanders said he is the candidate most likely to be able to bring new voters to the polls — particularly college students and other young people. “We need a huge increase in young people’s participation in the political process,” he said.

Sanders also bashed Republican governors and secretaries of state who are raising barriers to voting, such as voter ID laws. He said that he knows the areas of Vermont where he does not have strong support but, “It has never occurred to me … to say, ‘How can I make it harder for those people to vote?’”

“If I cannot win an election based on my ideas, then I shouldn’t win the election,” he said.

Sanders knocked former South Bend, Ind., Mayor Pete Buttigieg for taking money “from billionaires,” but he still concluded that any of the Democratic candidates would be preferable to Trump, and they will all unite in November.

“Our differences pale to the differences we have with this president,” Sanders said. “No matter who wins this nomination — obviously, I hope it's myself — all of us will get behind the winner and do everything we humanly can to defeat this most dangerous president.”

In January, former Secretary of State Hillary Clinton said Sanders and his campaign did not do enough to urge their supporters to support her in the 2016 general election after she won the Democratic nomination.

“All the way up until the end, a lot of people highly identified with his campaign were urging people to vote third party, urging people not to vote. It had an impact,” she said in an interview on the podcast Your Primary Playlist.

WGBH News' Paul Singer reported from Boston.