When Aretha Franklin — the Queen of Soul, who’s now gravely ill — released “Respect” in 1967, the country had never heard anything like it. She had taken a song written and first recorded by Otis Redding and flipped it: She was a woman demanding respect from a man, instead of the other way around.

“I had heard his version,” Franklin told The Post in 1987. “And I liked his version. Of course, I felt I could bring something new to it.”

It was a sentiment long overdue and came at a time when the country was in the throes of revolution. Protests against the Vietnam War were growing; racial unrest was gripping dozens of American cities. Franklin’s “Respect,” meanwhile, soared to the top spot on the charts and remained there for months.

It would become an anthem for the civil rights and women’s movements. Franklin, then just 24 years old, infused it with a soulful and revolutionary demand, a declaration of independence that was unapologetic, uncompromising and unflinching.

‘It becomes a woman thing’

Otis Redding, a songwriter and star who performed crossover hits, had recorded “Respect” in 1965. But Franklin’s version was unique in a few important ways.

“The original version by Otis Redding is a great song,” David Ritz, author of the biography "Respect: The Life of Aretha Franklin,” said in an interview with The Washington Post. “He sings the hell out of it, but Aretha, in her reinvention, personalizes it: ‘You are going to give me respect when you come home.’ It becomes a woman thing. But her version is so deep and so filled with angst, determination, tenacity and all these contradictory emotions. That is how it become anthemic.”

Before arriving at the studio, Franklin and her sisters had worked out the groove and the tracks.

“My sister Carolyn and I got together and — I was living in a small apartment on the west side of Detroit, piano by the window, watching the cars go by — and we came up with that infamous line, the ‘sock it to me’ line,” she told Fresh Air’s Terry Gross in 1999. “Some of the girls were saying that to the fellas, like ‘sock it to me’ in this way or ‘sock it to me’ in that way. It’s not sexual. It was nonsexual, just a cliche line.”

Tom Dowd, the legendary recording engineer, told Rolling Stone when Carolyn began singing “sock it to me,” “I fell off my chair when I heard that!”

It was Aretha’s idea to spell out “R-E-S-P-E-C-T” as well.

“She deconstructed and reconstructed the song,” Ritz said. “She gave it another groove the original song did not have. She added background parts. Before she sang the lead part, she turned the beat around and rewrote all these background vocals.”

In the same way an engineer might take an engine apart and put it back together, Ritz said, Franklin took apart the song and put it back together.

“It still works, but it has a lot more power. … It is a major overhaul and one of the major overhauls that never undercuts the original version,” Ritz said. “It took on a universality the original never had. I think it is a credit to her genius she was able to do so much with it. She should have been listed as a co-producer of the song.”

Franklin’s reinvention of “Respect” is marked by an urgency the original version did not have.

The personal becomes political

When Franklin recorded the song, she was not trying to make it into a political anthem, Ritz said. If anything, the song was personal.

Yet the song caught on with the black-power movement and feminists and human rights activists across the world. Its appeal remains powerful. In the last year, it has become a symbol of the #MeToo movement.

Aretha Louise Franklin grew up in Detroit, where her father, the Rev. C.L. Franklin, preached black-liberation theology and led a thriving flock at New Bethel Baptist Church. That was where a young Aretha learned to sing spirituals and gospel.

“His services were broadcast locally and in other urban markets around the country, and 60 of his sermons (including the legendary "The Eagle Stirreth Her Nest”) were released in album form,” according to the Rock and Roll Hall of Fame. “One of the best-known religious orators of the day, Rev. Franklin was a friend and colleague of Martin Luther King, Jesse Jackson, Adam Clayton Powell Jr. and other key figures in the civil-rights movement.”

Two months before the 1963 March on Washington, C.L. Franklin led a freedom march in Detroit, walking with King.

“Daddy had been preaching black pride for decades,” his daughter told biographer Ritz, “and we as a people had rediscovered how beautiful black truly was and were echoing, ‘Say it loud, I’m black, and I’m proud.’ ”

During a 2009 interview with The Post, Aretha Franklin recalled memories of her childhood home in Detroit, which was often visited by celebrities and civil rights leaders, including King, James Cleveland and Clara Ward.

Gospel legend Mahalia Jackson, she said, “was a family friend. She and my dad were very good friends.” Franklin told The Post it was her father who brought gospel singer Cooke to Detroit.

Whenever King visited Detroit, he stayed at the house of Franklin’s father.

“Well I don’t think anyone knew how significant he would be in history, but everyone knew what he was trying to do and certainly trying to gain equal rights for African Americans and minorities,” Franklin told Ebony Magazine in 2013.

Franklin was just a teenager when she began touring with King across the country as he preached nonviolence in the movement for civil rights.

“I asked my dad if it would be okay if I went” on the tour with King. “He said if that’s what I wanted to do, he thought it would be okay, so I went out for a number of dates with Dr. King. Harry Belafonte came out and of course, Andrew Young was there and Jesse [Jackson] came in and out.”

After King’s assassination in 1968, Franklin performed at his funeral.

Franklin’s greatest song

Aretha Franklin was just 18 when she signed a major deal with Columbia Records in 1960. Six years later, after her Columbia Records contract expired, she signed with Atlantic Records, releasing a string of hits.

But Franklin’s greatest song was “Respect,” according to the Rock and Roll Hall of Fame, where she was the first woman to be inducted, in 1987.

In 1967, Franklin won two Grammys for “Respect”— one for Best Rhythm & Blues Solo Vocal Performance and the other with producer Jerry Wexler for Best Rhythm & Blues Recording.

Wexler recounted its significance in Rolling Stone magazine in 2004.

“It was an appeal for dignity combined with a blatant lubricity,” Wexler wrote. “There are songs that are a call to action. There are love songs. There are sex songs. But it’s hard to think of another song where all those elements are combined.”

Kacey Musgraves won album of the year at the CMA Awards. Here’s why that matters.

She’s only the sixth solo female singer to win album of the year in the 52-year history of the CMAs

Miranda Lambert says her song went No. 1 because she sang with a ‘dude,’ and country radio is to blame

Radio is considered a critical component of country music success