Sen. Bernie Sanders, I-Vt., claimed Wednesday at an event hosted by Al Sharpton's National Action Network that he was "proud" to back Barack Obama in both of his presidential campaigns, despite a recent report indicating that Sanders was very close to challenging the former president in the 2012 primary.

Sanders, who was joined by five other 2020 Democratic candidates at the event, spoke of his record supporting civil rights. He recalled how in the past it would have been unheard of to imagine a black president and how he backed Obama as he became the first one.

SANDERS ONCE THREATENED TO PRIMARY OBAMA, PROMPTING REID'S INTERVENTION: REPORT

"I was proud to support Barack Obama in both of his campaigns," Sanders said.

Back in 2011, however, Sanders was critical of Obama and supported the idea of challenging him. A report last Wednesday in The Atlantic revealed that Sanders was apparently so close to launching a primary bid that then-Senate Majority Leader Harry Reid had to talk him out of it.

According to the report, Sanders privately discussed challenging Obama with Sen. Patrick Leahy, D-Vt., who reportedly warned Obama’s then-campaign manager Jim Messina. The Obama campaign was “absolutely panicked” over the prospect, the magazine reported. This apparently led to Reid speaking to Sanders twice in order to convince him to back off.

Former Vice President Joe Biden, who was on the ticket with Obama, slammed Sanders for this during Tuesday night's debate.

BUTTIGIEG FACES MORE ACCUSATIONS OF PLAGIARIZING OBAMA IN CAMPAIGN SPEECHES

"He said we should primary Barack Obama, someone should, and in fact, the president was weak and our administration was in fact not up to it," Biden said. Sanders responded by referring back to a remark from former South Bend, Ind., Mayor Pete Buttigieg about what the American people want.

"I will tell you, Pete, what the American people want, and, Joe, what the American people want. They don't want candidates to be running to billionaires for huge amounts of funding," Sanders said, not addressing what Biden said about Obama.

While the report in The Atlantic was the first to state that Sanders was strongly considering running against Obama, he made public statements in 2011 that appeared to support the idea of at least someone challenging Obama from the left.

"I'm not a Democrat. I'm an independent. But if a progressive Democrat wants to run, I think it would enliven the debate, raise some issues and people have a right to do that," he told WNYC radio at the time. "I've been asked whether I am going to do that. I'm not. I don't know who is, but in a democracy, it's not a bad idea to have different voices out there."

CLICK HERE TO GET THE FOX NEWS APP

"I think one of the reasons that the president has been able to move so far to the right is that there is no primary opposition to him, and I think it would do this country a good deal of service if people started thinking about candidates out there to begin contrasting what is a progressive agenda as opposed to what Obama is doing," he said on the Thom Hartmann Program. When asked during that program if he was encouraging anyone to challenge Obama, Sanders said, "At this point, I have not, but I am now giving thought to doing it."

Sanders is currently the front-runner in the 2020 Democratic primary race, coming off a big win in the Nevada caucuses. The next contest, the South Carolina primary, will take place Saturday.