A change has finally come — but it took 56 years.

Legendary singer Sam Cooke received a belated public apology Sunday for the racially motivated mistreatment he suffered in 1963 at the hands of hotel staff and law enforcement while performing in Shreveport, La.

Mayor Adrian Perkins posthumously awarded the “King of Soul” the key to the city at the 33rd annual Let the Good Times Roll Festival.

“I’m so honored that Mayor Perkins took the time to do the apology while I was performing at the festival,” said the late singer’s daughter, Carla Cooke, while accepting the honor on her father’s behalf.

Flashback to 1963: Through months of public records requests and dozens of interviews, KSLA 12 pieced together the events that played a crucial role in Shreveport’s evolving role in the civil rights movement.

Cooke and his wife, Barbara, rode in their Maserati while his brother, Charles, and the band’s manager, Senior Roy Craine, followed in a limousine. When Cooke and his travel companions arrived at the Shreveport Holiday Inn — where they had reservations — they were refused a room.

The singer exchanged heated words with the desk clerks.

In his Cooke biography, “The Triumph of Sam Cooke: Dream Boogie,” author Peter Guralnick detailed how Barbara feared they would kill her husband and begged him to stop yelling because, “They’d just as soon lynch you as look at you.”

Cooke, Barbara, Charles and Senior then drove to a hotel where celebrities of color were known to stay while on tour. When they arrived, the police were waiting for them — and all four were arrested and charged with disturbing the peace. They were held for five hours before being released on $102 bond each.

Despite bomb threats, Cooke — a popular crossover artist riding high on the pop success of “You Send Me” — took the stage that night at the Municipal Auditorium. During the show, his brother was arrested again while picking up liquor for the afterparty. (A fellow customer took umbrage at him speaking to the white sales clerk — and called the police.)

Charles was released a short time later, but the indelible impact of the incident served as the inspiration for Cooke’s signature song, “A Change Is Gonna Come,” which went on to become an anthem of the civil rights era.

“There is no question the song was inspired by what happened in Shreveport — it was such a terrible thing that happened and the song was a direct outgrowth of it,” Guralnick said. “It not only became an anthem for the civil rights movement, but for every social justice movement since.”

Rolling Stone magazine ranks the enduring track at No. 12 on its Greatest Songs of All Time list.

Cooke died in 1964 from a gunshot to the torso after an altercation at a Los Angeles hotel. He was 33.