Sanders didn’t end up running against Obama. But their relationship didn’t improve in the years that followed. In another incident, in 2013, Sanders laid into Obama in a private meeting he held with Democratic senators, saying that the president was selling out to Republicans over Social Security benefits. (More on that incident, which has also not been previously reported, below.)

Now Obama, the beloved former leader of the Democratic Party, and Sanders, the front-runner for the Democratic presidential nomination, are facing a new and especially fraught period in their relationship. To Obama, Sanders is a lot of what’s wrong with Democrats: unrelenting, unrealistic, so deep in his own fight that he doesn’t see how many people disagree with him or that he’s turning off people who should be his allies. To Sanders, it’s Obama who represents a lot of what’s wrong with Democrats: overly compromising, and so obsessed with what isn’t possible that he’s lost all sense of what is.

Obama has made clear in private conversations that he doesn’t like the idea of Sanders as the nominee (and has been only slightly more subtle in public comments), but he’s pushed back on some who have urged him to get involved, anxious that any move he makes could destroy the hope of him using his unique position to unite the party and defeat Trump during the general election. In a party this divided, Obama- and Sanders-style Democrats finding a connection may be the only way to win in November.

Obama is determined to make it work—if he has to.

“Obama has several friends and former colleagues in the race but believes that in order for the Democratic Party to be successful, voters will have to pick their candidate,” a person close to Obama told me. “Obama will campaign his heart out for whoever the nominee is, and that includes Senator Sanders.”

Obama and Sanders’s political relationshIP dates back to 2006, when Sanders showed up in Obama’s Senate office asking for a favor: Would Obama come up to Vermont to campaign for him? Obama had barely been in Washington a year, hadn’t started running for president, and he was already being called a disappointment by some liberal Democrats. But he was a superstar, already the most in-demand Democrat in the country, and he was an important stamp of approval for a democratic socialist aiming to be the de facto Democratic nominee in his state’s Senate race.

Obama agreed, and arrived on an unseasonably warm day in March 2006 for a fundraiser and rally at the University of Vermont, before a crowd of cheering students. Sanders called Obama a great leader of the Senate. Obama called Sanders a force against cynicism and said the state should send him and soon-to-be-elected Representative Peter Welch to Washington to “keep on stirring up some trouble.”

Sanders didn’t endorse or campaign for Obama in the 2008 Democratic presidential primary, though Obama went on to beat Hillary Clinton in Vermont with 59 percent of the vote.