CNN  — 

Sen. Bernie Sanders, who has mounted his campaign on the premise of rejecting the establishment, has released a new ad that features former President Barack Obama.

The ad, which is scheduled to air in several upcoming primary states, features audio and video of Obama strung together from several different settings in which the 44th president said kind things about Sanders.

It is the first time Sanders and his campaign have made a concerted effort to embrace Obama. Former Vice President Joe Biden, Sanders’ top competitor for the Democratic presidential nomination, has frequently highlighted his close relationship with Obama in his appeal to voters.

Visit CNN’s Election Center for full coverage of the 2020 race

“Bernie is somebody who has the virtue of saying exactly what he believes,” Obama says in the ad. “Great authenticity, great passion, and is fearless.”

The ad pulls from three different times Obama talked about Sanders: An interview with Politico in 2016, a speech Obama made in Vermont in 2006 to support Sanders’ campaign for the US Senate and Obama’s 2016 convention speech where he wasn’t necessarily singing Sanders’ praises but encouraging Sanders supporters to fully get behind Hillary Clinton.

Sanders has had an uneven relationship with Obama. According to The Atlantic, during Obama’s reelection bid in 2012, Sanders considered mounting a primary bid against him before ultimately supporting Obama’s reelection. Sanders has denied that he ever considered a primary challenge against Obama, but Biden’s campaign released a digital ad in South Carolina seizing on the report to slam Sanders.

Biden’s campaign on Wednesday highlighted his close ties to Obama in response to the new Sanders ad.

“Barack Obama chose Vice President Biden to be his partner over eight years in the White House, entrusting him with managing the stimulus that saved our economy from a depression, obtaining the deciding vote for the Affordable Care Act, and countless national security priorities,” Biden campaign spokesman Andrew Bates said. “By contrast, Senator Sanders explored a primary challenge to President Obama, who he compared to a ‘moderate Republican’ and said was not a ‘progressive.’ As recent history has proven, no quantity of ads can rewrite history – and there’s no substitute for genuinely having the back of the best president of our lifetimes.”

Sanders isn’t the first candidate to attempt to use Obama’s popularity in the 2020 campaign. Aside from Biden, former New York City Mayor Michael Bloomberg, who exited the race on Wednesday, also highlighted his relationship with Obama in an advertisement.

Obama has made it clear he will stay out of the Democratic primary contest, choosing not to endorse a candidate until the nominee is chosen. Sanders, in a recent interview with CNN, said he appreciated Obama’s decision to stay out of the primary and said the former president will play a vital role in uniting the party behind the eventual nominee.

“If I win, I’m sure he’ll be there at my side. If somebody else wins, he’ll be there at their side,” Sanders said last month. “But I expect and know that he will play an enormously important role in helping us to defeat [President Donald] Trump.”

CNN’s Daniel Dale and Sarah Mucha contributed to this report.