Some of Mike Bloomberg’s presidential campaign ads give the impression that Barack Obama has a glowing rapport with the former New York mayor.

Viewers could easily infer a cozy relationship or even an endorsement based on remarks made by Obama that are used in the ads. One posted to YouTube on Wednesday includes this from Obama: “I want to thank the mayor of this great city, Mayor Bloomberg, for his extraordinary leadership. And I share your determination to bring this country together to finally make progress for the American people.”

Of course, Obama has not yet made an endorsement in the 2020 campaign. Former presidents usually don’t do that in their party primaries. And several candidates, most notably former vice president Joe Biden, tout their own relationship with Obama to Democratic voters, given how popular Obama remains with them.

But Bloomberg’s claim of Obama’s good graces is particularly odd when you contrast it with the number of clips of Bloomberg criticizing Obama, covering his signature health-care reforms to his leadership, or lack thereof, on race relations.

One of Obama’s former National Security Council spokesman, Tommy Vietor, tweeted Tuesday that the ads were “jarring.”

And despite what Bloomberg’s ads suggest, Dan Pfeiffer, a former Obama senior adviser, said the two men weren’t close.

“That is not how I remember it,” he said Tuesday on MSNBC. “I do remember the 2012 endorsement that came five days before the election. To say that it was damning with faint praise would be generous, I think.

“Did they work together on issues? Absolutely,” he added. “But I think these ads tell a story that is belied by the reality of that relationship, which I think is somewhat complicated.”

Biden released a video Wednesday reeling through all the times Bloomberg spoke ill of Obama. “Welcome to the debates, Mike. We have a lot to catch up on about Barack Obama’s record,” Biden said.

Before launching his run for the Democratic nomination, Bloomberg was on the record quite a few times as a critic of the last Democratic president’s politics and the policies that were enacted during Obama’s presidency.

During the Dartmouth Presidential Lecture in 2010, Bloomberg called the Affordable Care Act, Obama’s landmark legislation, “a disgrace.”

“We passed a health-care bill that does absolutely nothing to fix the big health-care problems in this country. It is just a disgrace,” he said. “The president, in all fairness, started out by pointing out what the big problems were, but then turned it over to Congress, which didn’t pay any attention to any of those big problems and just created another program that’s going to cost a lot of money.”

And while speaking in England at Oxford University in 2016, Bloomberg appeared to blame Obama for not solving America’s race-relations problems. “I would argue that today we are more segregated, in America certainly, than we were, in terms of race, than we were a dozen years ago, and yet we’re just finishing up eight years with our first black president. ‘Why are we more separated than we were before?’ is the question you’ve got to ask yourself. Why during the Obama administration didn’t we pull together? Ask the president. That’s his job, really, to pull people together.”

And in a op-ed published on Bloomberg View just before the 2012 election, the former mayor described Obama’s approach to climate change, writing that he “found the past four years to be, in a word, disappointing.”

Obama spent his first term “engaged in partisan attacks and has embraced a divisive populist agenda focused more on redistributing income than creating it,” Bloomberg wrote.

Plenty of relationships between major political figures feature ups and downs and weather criticism. Obama’s words indicate that there must have been some common ground. But not all complicated relationships wind up the fodder of ads only showing one side of them, boosted by basically limitless spending.

These ads appear to have been effective, particularly with some black voters: Bloomberg is polling second only to Biden with black voters, according to the latest Quinnipiac University poll.

The ads are designed to give voters who think fondly of Obama the impression that the former president thinks fondly of the former mayor. And based on the former mayor’s own words, voters who think a Bloomberg presidency would be a continuation of the Obama era might be in for some surprises.