Former U.S. Rep. Barney Frank asserted that Mayor Pete Buttigieg’s sexual orientation is helping him in the polls among Democrats running for president, saying voters likely give Buttigieg credit for being open and honest about himself.

“His being gay is an advantage,” Frank, who became the first openly gay Congress member in 1987, told the Boston Globe on Friday.

Frank, 79, who represented Massachusetts in the House from 1981 to 2013 after serving as a state lawmaker, added that if Buttigieg were straight he didn’t think he would be doing as well.

PETE BUTTIGIEG WAS VOTED ‘MOST LIKELY TO BE PRESIDENT’ IN HIGH SCHOOL, REPORT SAYS

It “gives people a chance to affirm their lack of prejudice," he said.

Buttigieg, the mayor of South Bend, Ind., announced his 2020 presidential run last month and has quickly risen in the polls. Buttigieg got married last year and is the first openly gay U.S. presidential candidate.

“I think Beto O’Rourke may be regretting that he’s straight,” Frank told the Globe.

CLICK HERE TO GET THE FOX NEWS APP

Buttigieg will appear on a Fox News town hall event on May 19.