Star Trek V: The Final Frontier was directed by Captain Kirk star William Shatner and is regarded as one of the worst movies in the franchise. The film currently sits with a 22 percent Fresh Rating on Rotten Tomatoes and even the most hardcore fans agree that it's really bad. In Shatner's new memoir Live Long and... What I Might Have Learned Along the Way, which is due out next week, the actor admits that he should not have directed the film and regrets the decision.

William Shatner and Leonard Nimoy had their lawyers draft up a "favored nations clause" back when the original Star Trek series was still on the air. The clause stated that each actor would be paid the same and that they would receive the same raises in the future. Later, Nimoy directed Star Trek III: The Search for Spock and Star Trek IV: The Voyage Home, which meant that it was time for Shatner to get a chance to helm a movie, after only directing a few episodes of the show. After a pay dispute, Shatner was promised his chance to direct Star Trek V, which may not have been the best decision in hindsight. Shatner butted heads with Gene Roddenberry and Leonard Nimoy from the start.

The compromise that William Shatner is referring to is his original storyline that Star Trek creator Gene Roddenberry and Leonard Nimoy found to be objectionable. At the time, Shatner says that he was fascinated with televangelists. He found them to be "repulsive" and "strangely horrifying," which he decided to put into the script of Star Trek V. The televangelists formed the basis for the character Zar, later Sybok and put a focus on the search for God. Roddenberry didn't like the idea of God as portrayed by Western religion being thrown in the spotlight of a Star Trek film. Shatner had this to say about directing the film in hindsight.

"I had a choice. I could accept the compromise or refuse to direct the movie. I made a mistake; I accepted the compromise, which doomed the picture from the beginning."

William Shatner, Gene Roddenberry, and Leonard Nimoy came to a compromise, which Shatner believes doomed Star Trek V. Since Shatner wasn't exactly the best director, things on the set began to fall apart. Production of the movie began in October of 1988, and was plagued from the start. Shots filmed in Yosemite had to be reshot due to poor visibility and Kirk and Spock's mountain dialogue ruined the illusion of height. Shatner reportedly had a bit of a breakdown in the desert while filming and insulted an electrician and tensions were always high with Nimoy.

Related: Universal Creating Star Trek Land to Compete with Star Wars Land?

Star Trek V came out in the summer of 1989 and had the highest opening of any of the films in the franchise to date with $17.4 million. However, theater attendance swiftly dropped off by the second weekend, once word got out that it wasn't very good. While William Shatner regrets directing the project, it's more likely that he believes that his original version of the story would have been a lot better than what he compromised on. In the end, we'll never know. Shatner's memoir hits book shelves on September 4th and you can read a few more tidbits about his life it at Trek Movie.