President Barack Obama recalled a moment early in his first term when a Republican leader didn't even bother to disguise how he felt about a black man leading the country.
"You know," the unnamed Republican told Obama, "we don't really think you should be here, but the American people thought otherwise so we're going to have to work with you."
But Republicans weren't the only ones to say things that were overtly racist. A now-infamous article from The New Yorker reported a conversation between former President Bill Clinton and the late Massachusetts Sen. Ted Kennedy in 2008.
At the time Hillary Clinton was the front-runner in the Democratic primary, but when Obama began to gain on her, Bill tried to rally Democrats to his wife's side by painting Obama as someone who shouldn't even be considered as presidential material.
Popular VideoThis young teenage singer was shocked when Keith Urban invited her on stage at his concert. A few moments later, he made her wildest dreams come true.
“A few years ago, this guy would have been carrying our bags," Bill said.
Despite those experiences, Obama told CNN's Fareed Zakaria that he doesn't believe racism was a major component in political opposition to his policy goals. The interview, in which Obama reflected on his eight years in office and how race relations in the U.S. have changed during his presidency, suggests the president is more forgiving than some of his closest aides and advisers.
"It's indisputable that there was a ferocity to the opposition and a lack of respect to him that was a function of race," said David Axelrod, who served as Obama's chief strategist during the 2008 and 2012 presidential campaigns and remained a close adviser during Obama's first term.
Obama himself acknowledged to CNN he made some missteps in the early days of his administration.
Popular VideoThis young teenage singer was shocked when Keith Urban invited her on stage at his concert. A few moments later, he made her wildest dreams come true:
In 2009 Harvard professor Henry Louis Gates Jr. was arrested by a police officer in Cambridge, Massachusetts, after a passerby thought Gates was breaking into a house. It turned out it was Gates' own home, and he was wrestling with a front door that had become jammed. Gates said he felt insulted by the police response, the situation escalated, and Gates was charged with disorderly conduct.
While presidents don't typically weigh in on minor police incidents, Obama weighed in on the Gates arrest during a press conference. Acknowledging "not having been there and not seeing all the facts," Obama said police had acted "stupidly" by arresting Gates, according to an NPR report at the time.
The president later admitted he "could have calibrated those words differently" and tried to resolve the situation by inviting Gates and the officer to the White House to drink beer and talk.
Obama walked into another racial land mine in 2012, when Florida resident George Zimmerman gunned down 17-year-old black boy, Trayvon Martin. Obama, who has two daughters, said that if he had a son, "he would look like Trayvon."
Some criticized the president for injecting himself into another racial incident, but a 2012 article in The Washington Post said it was evidence of "Obama's evolution and rising comfort level in dealing with the matter of race." Obama also received support from some surprising corners.
Martin's family said they were comforted by the president's words, while Ari Fleischer -- former White House press secretary during the George W. Bush administration -- praised Obama for the way he spoke about Martin's death, saying he "handled it delicately."
Obama continued to walk a thin line during the latter half of his presidency, which saw an increasing number of high-profile incidents involving police shooting and killing unarmed black men, and the rise of groups like Black Lives Matter in response.
Some called on Obama to say more in support of Black Lives Matter, CNN noted, while others thought the president should have been more forceful in supporting police. But Obama tried to take the middle road, cognizant of the pressure on him from all sides.
"He never ran to be the first black president. He ran to be the president of the United States and he happens to be black," Axelrod said. "He needed to become a force for healing, and finding the right way to do that was something that he wrestled with."
In his own words, Obama says he believes overall race relations in the U.S. have become "substantially better," but tempered that by adding "we've still got a lot more work to do."
"More than anything," Obama said during a speech in Poland earlier in 2016, "what I hope is that my voice has tried to get all of us as Americans to understand the difficult legacy of race; to encourage people to listen to each other."