Former President Barack Obama has told confidantes that he would intervene in the Democratic presidential primary should Vermont Sen. Bernie Sanders appear to be the likely 2020 nominee.

According to Politico, Obama, 58, told advisers that when Sanders, a socialist, seemed more likely to be the nominee, the former president felt obligated "to speak up and stop him." But Obama has since thought such action would be unnecessary, citing Sanders's flat poll numbers.

Another close adviser said: "If Bernie were running away with it, I think maybe we would all have to say something. But I don't think that's likely. It's not happening."

Obama's musings are reminiscent of challenges Sanders, 78, faced from the Democratic establishment during his first White House run in 2016. Former interim Democratic National Committee chairwoman Donna Brazile wrote in her book that she found evidence the nominating process was "rigged" against Sanders at the time she headed the party.

In multiple interviews this year, Sanders has agreed with Brazile's conclusion, calling the entire process "rigged" from the start in favor of eventual nominee Hillary Clinton. Sanders claimed if he was the nominee, he could have beaten President Trump.

In response to outrage from much of the party's base, the Democratic Party significantly weakened the role of party insiders at the national convention, known as superdelegates. Sanders claimed Clinton's monopoly on superdelegates effectively froze him out of the nomination.

Throughout this cycle's primary, Sanders has worn the party's nervousness about his potential nomination as a badge of honor, by consistently attacking the political establishment in his stump speeches.

"The ideas that we were talking about then were considered by establishment politicians and mainstream media to be 'radical' and 'extreme' — ideas, they said, that nobody in America would support. Raising the minimum wage to a living wage. Too radical. Guaranteeing healthcare to all as a right, not a privilege. Too radical," he said in March during an Iowa rally. "Creating up to 15 million jobs by rebuilding our crumbling infrastructure with a $1 trillion investment. Too radical. Aggressively combating climate change. Too radical. Reforming our broken criminal justice and immigration systems. Too radical. Not taking money from super PACs and the rich. Too radical. Ending the power of superdelegates at the Democratic Convention. Too radical."

Despite Obama dismissing his candidacy, Sanders has seen a surge of support following the heart attack he suffered last month. A RealClearPolitics average of this month's national primary polls has put Sanders in second place at 19.5%, behind former Vice President Joe Biden, who has 29.3%, and ahead of Massachusetts Sen. Elizabeth Warren, at 18%.

A national Emerson College poll taken between Nov. 17-20 had Sanders tied for first with Biden at 27% support.