Bernie Sanders is facing push-back over his take on how racism affected the outcome of the midterm elections.

In an interview posted after the election on Daily Beast about Florida Democratic gubernatorial candidate Andrew Gillum, who is African American, Sanders said, "He had to take on some of the most blatant and ugly racism that we have seen in many many years. And yet he came within a whisker of winning."

But it was what Vermont senator said next that drew many people's ire on Twitter: "I think you know there are a lot of white folks out there who are not necessarily racist who felt uncomfortable for the first time in their lives about whether or not they wanted to vote for an African-American."

People were quick to question Sanders' statement and reasoning on social media.

"I love Bernie but this is really problematic for me," one Vermonter tweeted. "If you can't vote the first time for a POC, why would you suddenly be able to vote for them second time around? You're racist or you're not."

Tweeted journalist Yamiche Alcindor: "Many would define not supporting someone based solely on race as racist."

Bernie Sanders stumped for Andrew Gillum, Stacey Abrams

Sanders campaigned for progressive-leaning Democrats leading up to Tuesday's election is seen by many political analysts as laying the groundwork for a bid to win the Democratic nomination in 2020.

His endorsement of high-profile African American candidates include two southern gubernatorial hopefuls Stacey Abrams in Georgia and Andrew Gillum in Florida. Both races were undecided as of Friday morning.

As Vox put it, "Bernie is stumping in the South and winning over some black voters."

Sanders struggled to get African-American votes in 2016 presidential primaries

Later on Wednesday, Sanders expanded on his Daily Beast comments to NPR saying, "There's no question that in Georgia and in Florida racism has reared its ugly head. And you have candidates who ran against Gillum and ran against Stacey Abrams who were racist and were doing everything they could to try to play whites against blacks."

During his 2016 presidential bid, Sanders struggled to win over large numbers of African American voters who tended to favor his rival Hillary Clinton.

More:How Bernie Sanders can win the black vote

Sanders struggled them at times talking about race, including this memorable line from a debate in Flint, Mich., in March 2016: "When you're white, you don't know what it's like to be living in a ghetto, you don't know what it's like to be poor."