Mark Wilson/Getty Images

If many millennial Democrats had their way, Bernie Sanders would be barred from running for president.

A new BuzzFeed and Maru/Blue poll found that 25 percent of Democrats between the ages of 22 and 37 believe that people over 65 years are too old for run for president, while another 22 percent believe the age limit should be 70 years old. This would rule out potential 2020 Democratic contenders including Bernie Sanders (77), Joe Biden (75) and Elizabeth Warren (69).

And yet, the poll also found that almost half of millennial Democrats consider themselves democratic socialists or socialists. Sanders has used both labels to describe himself. The poll did not define “socialist,” “socialism,” or “democratic socialist” for its respondents.

If Bernie had won the Democratic nomination for president in 2016, when he was 75, he would have been the oldest nominee in U.S. history. Hillary Clinton, at 69, went on to become the oldest nominee in the Democratic Party’s 188-year history.

A YouGov poll from 2015 found that the vast majority of Americans would set the “ideal” age range for a new president much lower than Clinton or Sanders’s ages. Less than 1 percent of Americans said the “ideal” is 70 years old or higher, while 92 percent put the ideal range below 60. There was a relatively small difference between Democratic and Republican preferences on this issue: both groups were most likely to pick 50-59 age range as the ideal age range.