By Eric Marrapodi, CNN Belief Blog Co-Editor

"Soul Surfer," the feature film based on the true story of surfer Bethany Hamilton being attacked by a shark and her journey back to surfing, opened last weekend in the fourth spot on the box office charts - partly a testament to its appealing family-friendly message and a marketing campaign that heavily targeted religious groups.

But even though Hamilton and her family's faith plays a key role in the film, many audiences would be surprised to learn that the question of how to show their religion in the film caused huge debate on set.

"I think to get anything in the film was a battle," said Sarah Hill, Hamilton's youth group leader at North Shore Christian Church, who was played by Carrie Underwood in the movie.

"Basically, what you're doing is you have all these people who want to make a movie about Bethany and they don't know the Lord and they don't have a personal relationship with Jesus. For what we have in the movie it was such a battle."

In one scene, Hill's character is shown counseling Hamilton as she struggles with living as an amputee. She reads from Jeremiah 29:11 " 'For I know the plans I have for you,' declares the Lord, 'plans to prosper you and not to harm you, plans to give you hope and a future.' "

The morning they went to shoot that scene, said Hill, who was on set often, "Twelve producers, me and the director were all sitting at the table and they all are just adamant about the Scripture not being in the movie. And they were saying at least let's not have the reference in it."

"For me it was a hill worth dying on to keep God in the movie," she said.

Tom Hamilton, Bethany’s father, said, “In my heart of hearts I wanted as many Christians as we could get to play parts in the movie. They just have a different spirit about them. ... Craig T. Nelson, who is a really strong Christian and goes to our church in Kauai, I called him and begged him to be in the movie.

“A lot of the producers didn’t want to go too overboard because they thought Christianity doesn’t always sell well,” Tom Hamilton said.

Kevin Sorbo, who plays Holt Blanchard, the father of Hamilton's best friend, said, "Sony (Pictures, the film's producer) was afraid to throw in the word Jesus. They said you can have God but not Jesus. They were worried about that.

"The studios, you can't really fight them," he said. "Hollywood screams for freedom of speech but only if you agree with them. It's a very two-faced industry."

Sorbo said Sony wanted to take out another scene in which Bethany Hamilton wakes up in the hospital. Her father, played by Dennis Quaid, is shown reading a Bible. He reads to her from Philippians 4:13: "I can do all things through him who gives me strength."

Tom Hamilton said the studio rented a house for the family during the filming so they could be on set every day.

“They changed the script a lot,” Hamilton said. “Dennis Quaid would come up to say, ‘Hey, this doesn’t sound right, we need a Scripture here.’ The script was in constant motion, it changed on the set even.”

“They listened to us. We had some pretty heated discussions. Everyone saw how passionate about it we were, getting the message we wanted out there,” he said.

Rich Peluso, the vice president of AFFIRM Films, a division of Sony Pictures, said the studio made no efforts to whitewash the Hamilton family's faith for the movie. He points out that Jesus is mentioned twice in the film and that the family's faith is central to the plot.

On set, he said, "There were certainly lots of discussions," specifically about the inclusion of Hill's character quoting Jeremiah.

"There were some that voiced the opinion that may have made it sound too faith-focused," Peluso said. "The counter-argument was, 'Well, if her character uses those words and doesn't attribute them to the Bible it seems like she's stealing them.' We came to the agreement the best thing to do was to use the Scripture there."

The biggest question the movie's producers were trying to determine was, "How do we have it come off (in a way) that is authentic to the family's faith and doesn't push it too far so that it appears to the viewer to be forced in?" he said. "We didn't want it to appear we were pushing in faith to appeal to the faith community."

The studio made a big push to attract faith leaders to the project, setting up screenings for pastors and ministry leaders. But it's hard to characterize "Soul Surfer" as a Christian movie.

Like the hit movie "The Blind Side," though, the characters in "Soul Surfer" are decidedly Christian. The movie opens with Bethany Hamilton rushing into a beachside church service because the Sunday morning waves were just too good to pass up.

"It's not that it's a Christian movie, it's an American movie," Peluso said.

In 2003, when a tiger shark attacked the 14-year-old Hamilton near Kauai, Hawaii, the story gripped the nation. Just three weeks after the attack, Hamilton was back in the water learning how to surf with one arm. A year later, she won a national surfing title.

Battles over how to portray religious themes in movies are becoming more common, as Hollywood becomes more open to addressing faith and marketing movies to religious audiences but worries about alienating nonreligious audiences or viewers from other traditions.

“After all the back and forth - and there’s always back and forth - it’s always best to err on the side of authenticity,” said Michael Flaherty, the president of Walden Media, which has helped produced the Chronicles of Narnia franchise and other Christian-themes movies.

“It actually is not in your commercial interest to secularize something like that, people will reject it,” he said of “Soul Surfer.” “People think they are making these decisions to broaden their audience but what they end up doing is narrowing it.”

But Flaherty said he thought “Soul Surfer” struck the right balance. “To see a movie where she wasn’t talking about her faith … it would have flopped,” he said. “It’s silly to narrow (the family’s faith). It’s like someone saying, ‘Let’s make a movie about Bethany but not talk about surfing.’”

Today, Bethany Hamilton is a professional surfer. In 2010 she was ranked 23rd in the world. "The shy kid has gone on to have a legit pro surf career despite her massive physical impairment," Joel Patterson recently wrote in Surfer Magazine, "and, in the process, she's inspired uncountable people struggling against cruel twists of fate."

Hamilton has long been outspoken about her Christian faith and the positive role it played in her recovery.

"We work with a lot of films, but the Hamiltons have to live with this for the rest of their lives, so that balance was important to us," AFFIRM's Peluso said. "I think we threaded the needle after a lot of work."

Tom Hamilton said Peluso constantly went to bat for the family with the movie, adding, "There was some give and take, but everything that was very important for us to portray ended up in the movie. We were very happy over all with the movie. We just wanted the real story told.”