With Pete Buttigieg, the openly gay mayor of South Bend, Ind., surging in recent Iowa polls in the hunt for the Democratic nomination for president, a new poll shows half of Americans are personally ready for a gay president, but they’re not as convinced the rest of the country is prepared.

Politico reported Thursday that according to a Politico/Morning consult poll, 50% of registered voters say they are “definitely or probably ready” for a gay commander-in-chief, while 37% said they were definitely or probably not ready.

But when asked whether they believed the country as a whole was ready, voters weren’t so sure: 40% said they believed the country was ready, while 44% said the country wasn’t.

Voters were even less confident about their neighbors’ openness to a gay president. Just a quarter of respondents said they thought their neighbors were ready for a gay president, compared to 46% who said their neighbors were “either definitely or probably not ready for a gay president,” Politico reported.

The Politico/Morning Consult poll also showed a stark partisan divide, with Democrats far more likely than Republicans or independents to say they’re ready for a gay president. The poll, which surveyed almost 2,000 registered voters, showed 58 % of Republicans were not ready for a gay or lesbian president, compared to 22 % of Democrats and 32 % of independents who said they weren’t ready.

Buttigieg, who spoke at the Emerson Colonial Theatre in Boston Tuesday night, was initially seen as a longshot but is often described as the first serious presidential contender who is openly gay. The Afghanistan war veteran has consistently commanded fourth place in national primary polling behind former Vice President Joe Biden and Sens. Elizabeth Warren of Massachusetts and Bernie Sanders of Vermont, according to polls tracked by Real Clear Politics.

2020 candidate Pete Buttigieg attends grassroots event in Boston LIVE: 2020 candidate Pete Buttigieg attends grassroots event in Boston. abcnews.com/politics Posted by ABC News on Tuesday, October 29, 2019

Earlier this month Buttigieg surged “within striking distance” of Biden and Warren in Iowa’s first-in-the-nation caucuses, USA Today reported. The latest Suffolk University/USA Today poll showed Buttigieg with a 7-point bump, putting him at 13 % among 500 likely Democratic Iowa caucusgoers compared to Warren’s 17 % and Biden’s 18 %.