“This is a story only God could write.”

Jennifer Hudson is speaking from New York, where she is doing publicity for “Respect,” a movie about Aretha Franklin in which Hudson plays the late singer. Hudson, 39, was remembering her audition for “American Idol” 17 years ago, when she sang a version of Franklin’s romantic ballad “Share Your Love With Me.”

Even though Hudson was eventually eliminated from “Idol” competition — finishing seventh, in one of the most shocking upsets in the series’ history — she was later given the rare opportunity to open for Franklin at a concert in Merrillville, Ind. Then, after Hudson won an Oscar for her showstopping portrayal of Effie in the 2006 filmed adaptation of “Dreamgirls,” she and Franklin met to discuss a possible biopic.

But, as Hudson recalls now, “You have meetings like that all the time in the film industry.” It wasn’t until eight years later, when Hudson was appearing in the Broadway revival of “The Color Purple,” that Franklin called her with the news. By then, producers Scott Bernstein and Harvey Mason Jr. had approached Franklin about developing a movie of her life. When it came to casting, Franklin was certain. “Jennifer was part of the package,” recalls Bernstein. “She was already the one who was etched in stone.”

“She said, ‘I’ve made my decision, and it’s you I want to play me,’ ” Hudson says. “She told me not to tell a soul, and I said, ‘Yes, ma’am, I won’t.’ ” She told the press the next day, but she didn’t tell them my name. She said, ‘I talked to the young lady, and she knows who she is.’ ” On Jan. 27, 2018, record executive Clive Davis — who produced both Franklin and Hudson at Arista Records — made it official while introducing Hudson at a pre-Grammy awards gala.

Now that “Respect” is a reality (the film opened in theaters on Friday), it seems obvious why Franklin chose Hudson to play her: Although the two women’s sounds are different — Hudson’s tone is higher and clearer than Franklin’s unique timbre — what happens on-screen in “Respect” is less a performance than the meeting of two sanctified musical spirits. Even today, Hudson is mystified at how her life and experience intersected with Franklin’s, beginning with their shared roots in the Baptist church and achieving breakout stardom at 25, which is when Franklin hit nationwide success with the albums “I Never Loved a Man the Way I Love You,” “Lady Soul” and “Aretha.” “Even being the person experiencing it, it’s like witnessing it at the same time.”

Still, those commonalities were lost on Hudson at first, when she wasn’t sure she was up to the task of filling Franklin’s shoes. “I feel like she saw so much more than I did to say, ‘Jennifer, play me.’ It goes beyond singing and acting. It’s hard even to have conversations with people who haven’t experienced what you’ve experienced. Why would you want someone to tell your story who hasn’t experienced those things themselves? It clicked for me that, wow, she saw so much more that related between the two of us.”

Part of Franklin and Hudson’s shared history involves trauma. Both lost their mothers under tragic circumstances — Franklin’s beloved mother, Barbara, died suddenly when she was 10, and Hudson’s mother was killed in a 2008 shooting, along with Jennifer’s brother and nephew. In “Respect,” Franklin’s experience of sexual and physical abuse are acknowledged, but not shown in graphic detail compared with, say, “What’s Love Got to Do With It” or “The United States vs. Billie Holiday.” Hudson, who also executive produced “Respect,” says she felt a responsibility to represent the pain that informed Franklin’s life without sensationalizing it.

“I felt like my duty and job and position in this was to tell it with as much care as I could,” she explains, “and also to use it to bare myself, as well. As humans, we all go through life, and in life there are traumas. But when it comes to legends and icons, [we] forget there’s a human under there. When it’s someone of this stature you want to handle it with as much care as you possibly can, but it’s our job to tell the story.”

Since meeting Franklin in 2007, Hudson became a friend and confidante of the singer, who she says phoned her weekly before she died in 2018. Hudson calls her a “motherly” presence in her life, but she admits that there was a part of Franklin that remained unreachable, even for her. That was “the most challenging part” of playing her, she says.

“She didn’t express herself much. You couldn’t read her,” Hudson says. “Even being around her, you just never knew what she was thinking. She didn’t give away much, verbally or expression wise. But she had this regal, strong presence.

“How do you tell this story as an actor, with minimal words, but I still have to give it some kind of expression for the viewers to be able to understand?”

Franklin also became a mentor. Her most lasting influence came by way of “teaching me about her life,” Hudson says. “She said, ‘Jennifer use your voice, own who you are.’ That was a huge part of our conversations. She was very big on that. Adamant about it.”

Although it’s tempting to use the phrase “finding her voice” to describe Franklin’s personal and artistic journey in “Respect,” it’s more a question of her finally wresting it from the men who want to control it.

“So often, it’s your instrument, but it’s dictated by others,” Hudson observes. “It took awhile for her maybe to realize that . . . and then to understand that, for her, singing was beyond just singing a song; it came with a purpose and a power. God gave her that gift. You share that gift, but it’s not for [others] to dictate it. . . . So yeah, [it wasn’t] so much about finding her voice as much as not giving it away.”

In “Respect,” Hudson plays Franklin as a woman of few words, but boundless expression when it comes to her art. In his autobiography, Atlantic Records producer Jerry Wexler described Franklin’s singular genius as a function of “head, heart and throat,” meaning her impeccable musical judgment, emotional honesty and raw talent.

“We call it anointed where I come from, in the Church,” Hudson says. “She was truly anointed and gifted by God. That is something you cannot learn. She was born that way. That was her calling and what she was meant to do. . . . Some people are gifted vocally, or gifted as a musician, or gifted as a writer. She was gifted in every capacity. And heavy lies the head that wears the crown.

“The soul comes from those experiences. That’s what she expressed through her music and why people connected to it. It came through real-life things. And when it’s real, you can’t help but to relate.”

The last time Franklin called Hudson, they talked about two of Franklin’s favorite things, “cooking and eating.” Hudson’s then 9-year-old son, David Daniel Otunga Jr., had discovered a love for the kitchen, and Franklin was eager to hear what he was whipping up; she was dead eight days later. After so many weekly phone calls, Hudson was still stunned to be one of the last people to speak to Franklin. “I was like, ‘You called me?’ ”

Precisely three years later to the last day they spoke, Hudson attended the premiere of “Respect” in Los Angeles. The most important aspect of Franklin’s life that she wanted to convey in the movie, Hudson says, “was her faith, and her roots in the church. That had to be present throughout. And that is important to me as well.

“Even at the premiere, I said, ‘We need to pray,’ ” Hudson recalls. “We had to have that there, because that’s who she was.”