Garrett Batty wanted to approach a landmark moment in the early history of The Church of Jesus Christ of Latter-day Saints in a way that wasn’t like the average Sunday school lesson.

“I wanted to tell a story about the events of Liberty Jail, but through the eyes of somebody that wasn’t one of the prisoners,” Batty said in an interview this week.

Those prisoners were Joseph Smith, the prophet and founder of the church, and five of the church’s top leaders. They were accused of treason and murder, charges stemming from the conflict between Latter-day Saints and members of the Missouri militias who were hired to protect them but instead turned on them.

That story, and the revelations Smith had during the four months he spent in that jail (from Dec. 1, 1838, to April 6, 1839), have been written about extensively. They take up three chapters in the church’s Doctrine and Covenants.

In the movie “Out of Liberty,” which Batty directed and co-wrote, the story is told not from Smith’s viewpoint, but from that of the man holding the keys. (The movie, filmed in Utah, opens Friday in Utah theaters.)

Most who read about Liberty Jail learn little about the jailer, Samuel Tillery. “I had always thought he was an unnecessarily cruel person,” Batty said. Tillery is depicted in the stories as regularly clapping Smith and his followers in irons, particularly after escape attempts. But Tillery’s obituary gave a different story — of a man who became a justice of the peace, and was an esteemed citizen.

“What generally is typically known is that there was a lot of suffering there, and then a revelation was received,” Batty said of Liberty Jail. “Where I saw this was as a historical, jailbreak Western, a thriller, at a critical point in history where there’s a lot of divisiveness, a lot of disagreement, and one person caught in the middle.”

Brandon Ray Olive, who plays Smith in the film, sees Liberty Jail as Smith’s “‘Oh God, where art thou’ moment ... and then the revelation, the redemption, and ultimately their own liberation.”

Olive, who grew up in Louisiana and is not a member of the church,said, “This was a part of American history that, when I read it and learned it was a true story, I was mad. I was genuinely upset that I didn’t know about this.”

Batty, who is a Latter-day Saint, said he looked at “Out of Liberty” not from a faith perspective, but with a filmmaker’s eye. “There are some great Westerns I feel that are morality tales,” Batty said, naming such classics as “The Man Who Shot Liberty Valance” or “3:10 to Yuma.”

“The jailer really is grounded in his values of justice, in right versus wrong,” Olive said. “While he’s doing this job, which is to keep these ‘heathens,’ if you will, imprisoned, he also has to keep this mob from getting to them. Then he starts to really question his role — and is that defined by the law, or by something that you feel internally?”

When Jasen Wade, who plays Tillery, came in to audition, he read for the roles of the prisoners, Batty said.

“When we offered him the part, he was thinking, ‘Yeah, OK, you want me to come in and play the jailer, sure.’ He had no idea he had just been cast in the lead,” Batty said. “I said, ‘Jasen, have you read the script yet? You’re it. You’re carrying the movie.’”

“Here I am, approaching Joseph Smith as an outsider leaning in,” Olive said. “And here’s Jasen Wade, a person of faith, [playing Tillery] as an outsider leaning in. It was really a cool mirror image for the two of us.”

Batty aimed to play down Smith as a prophet. “What does [Tillery] go home and tell his wife about? It’s not ‘I met a prophet today.’ It’s ‘maybe these guys are different than the news is reporting.’”

Olive said his perspective on Smith is not a leader on a pedestal, but “a man, a human being, that I was curious about. He was an ordinary person but in extraordinary circumstances.”

“We wanted a fresh take” on Smith, Batty said. “I see Liberty Jail as an origin story for who Joseph becomes. This was the lowest point of his life. ... He’s not feeling prophetic at the moment, he’s not feeling God with him. What better opportunity to explore the human side of this person?”

“Out of Justice” is being marketed nationally, and the poster and trailer don’t mention the Mormon history. Batty credits his distributor, Samuel Goldwyn Films, who “picked this up because this is a Western. It’s also a pretty powerful modern-day morality play. They think it will play in front of worldwide audiences.”

Simultaneously, Salt Lake City-based Purdie Distribution is handling the movie in Utah. “They know how to get the movie into this space,” Batty said, adding that this weekend’s opening in Utah and Arizona will help determine how fast the movie rolls out nationally.

“When Hollywood releases a movie, they don’t release a Utah-only campaign,” Batty said. “And that’s not what we’re going to do. We deserve better.”