Tyler Perry talks about why Barack Obama was 'very emotional' on the day of their historic photo together

Perry posted the photo with Obama to Instagram for Black History Month.

Actor, comedian and filmmaker Tyler Perry says that on the day he took a historic photo with then-President Barack Obama in 2015, it was "very emotional" for Obama, because on that same day there was a horrific shooting in South Carolina.

Perry discussed the significance of the photo with "The View" on Thursday. Although he took the photo in 2015, he shared it on social media last week in celebration of Black History Month,

Perry said in the photo's caption that the picture was taken in his home library. In the photo, both he and Obama stand tall next to two chairs that hold more value than they may seem.

"I bought these chairs at auction," Perry said in his post. "They were once owned by Abraham Lincoln. We sat in them and had an incredible conversation."

Aside from noticing that Perry must read a lot, co-host Joy Behar was interested to know more about the importance of the photo.

Obama went to Perry's home in Los Angeles for a fundraiser, but "this was a very emotional day for him because it was the day that the shooting happened in South Carolina," Perry revealed.

The mass shooting Perry references is the Charleston church shooting on June 17, 2015. On that day, Charleston police responded to calls at approximately 9 p.m. about open fire at the predominantly black Emanuel AME Church.

Nine people attending Bible study in the church that evening were murdered, making it one of the deadliest mass shooting in the United States at the time.

The convicted shooter, 21-year-old Dylan Roof, was sentenced to death by a unanimous jury for the 33 federal charges against him.

On "The View," Perry set the stage for the moment he shared with Obama on that day.

"We're standing there in front of those chairs. They were once owned by Abraham Lincoln," he said. "So we both had an opportunity to sit in those chairs and have a conversation."

"A sitting president, a president in the past who freed the slaves and two African-American men sitting in the chairs having a conversation," Perry said. "Such a wonderful moment."

On Wednesday, Perry spoke with "Good Morning America" co-anchor Robin Roberts as part of ABC News' Black History Month speaker series.

"I saw him be human, you know, in private, and share his emotion about it and had the pain of it. But then when it was time to go, I saw him put on that jacket and become the president of the United States," Perry said. "It was so regal, so classy, so cool."

Born and raised in New Orleans, the Charleston church shooting hit "so close to home" for Perry, according to his Facebook post from the day following the horrific act of violence.

The day following the massacre, Obama expressed his "deep sorrow" over the the attack.

"There is something particularly heartbreaking about a death happening in a place in which we seek solace and we seek peace, in a place of worship," he said at the White House. "I don't need to be constrained about the emotions that tragedies like this raise. I've had to make statements like this too many times."

The former president also delivered the eulogy for Rev. Clementa Pinckney, a pastor of the Emanuel AME Church who died in the attack, and led the choir in "Amazing Grace."

"I want somebody who is going to unite us and knows how to unite us," Perry said to Roberts about the nation's current political divide. "I think we all deserve that as Americans."

Every episode of ABC's award-winning talk show "The View" is now available as a podcast! Listen and subscribe for free on Apple Podcasts, Google Podcasts, TuneIn, Spotify, Stitcher or the ABC News app.