Americans are not happy with the prospect of a socialist candidate like Bernie Sanders for president, a new poll finds.

A majority of US residents — 53 percent — said they would vote against a socialist candidate for president, the Gallup poll released Tuesday reveals. Meanwhile, only 45 percent of respondents in the poll said they would vote for a socialist.

In fact, socialism was the only category in the poll rejected by a majority of Americans.

For example, 60 percent of Americans said they would vote for an atheist while 38 percent said they wouldn’t. And more than nine in 10 Americans said they would vote for a presidential candidate nominated by their party who is black, Catholic, Hispanic, Jewish or a woman.

The findings come as Sanders (I-Vt.) — a self-described Democratic socialist — is a top-tier candidate vying to win the Democratic nomination for president. He was leading in polls to win Tuesday’s New Hampshire primary and has surged ahead of Joe Biden in national polls.

There is a political divide over the socialist candidate question, however.

For example, 82 percent of Republicans said they wouldn’t vote for a socialist while just 17 percent said they would. By comparison, 76 percent of Democrats said they would vote for a socialist, while 21 percent wouldn’t.

Significantly, only 45 percent of key swing-state voters — self-described independents — would vote for a socialist while 51 percent said they would not.

As for other categories, 80 percent of respondents said they would for an evangelical Christian candidate, 78 percent for a gay/lesbian candidate, 70 percent for a candidate under the age of 40, 69 percent for a candidate over the age of 70 and 66 percent for a Muslim candidate.

Only about 4 in 10 Republicans said they would vote for an atheist or Muslim candidate while a majority of Democrats and independents said the same.

The question to respondents was phrased this way: “Between now and the 2020 political conventions, there will be discussion about the qualifications of presidential candidates — their education, age, religion, race and so on. If your party nominated a generally well-qualified person for president who happened to be [characteristic], would you vote for that person?”

The Gallup analysis concluded, “As the 2020 Democratic presidential primaries get underway, it may be instructive to know that little prejudice stands in the way of Democratic as well as national support for candidates who happen to be Catholic, Hispanic, Jewish or female. Being especially young or advanced in age could pose minor appeal problems,” the Gallup analysis of the survey said.

“Being gay or lesbian, Muslim, an atheist or a socialist wouldn’t cause much stir among Democrats, but these candidates could have difficulty attracting support from Republicans and, to a lesser extent, from political independents.”

Gallup has asked whether Americans would back non-Protestant white male candidates since 1937. Support for a woman as president was only 33% at that time.

Since 1958, the sharpest increase in voting tolerance has been for black candidates, followed by atheists, women, Jewish candidates and Catholics. More recently, the biggest shift of support has been for gay or lesbian candidates.

The latest Gallup poll queried 1,033 respondents between Jan. 16 and 29 has a four percentage-point margin of error.