Eddie Murphy originally had a role in 'Star Trek IV: The Voyage Home'.

The 55-year-old star was meant to join the sci-fi world of 'Star Trek' in 1986 as an astrophysicist studying at Berkley when the crew of the Enterprise travel back in time to collect two humpback whales who will save the world in the 23rd century, but the deal eventually fell through and his role was written out.

Speaking to The Hollywood Reporter's Heat Vision blog, scriptwriter Steve Meerson said: ''It was always the same story that approved, but the original draft included a part for Eddie Murphy. Eddie was on the lot at Paramount at the time and arguably was the biggest star in the word. They had told us he was a huge 'Star Trek' fan.''

When the deal with Eddie eventually fell through, Steve and his writing partner Peter Krikes got to work rewriting the script, and instead opted to cast Catherine Hicks in the role of Doctor Gillian Taylor, a marine biologist and the love interest of Captain Kirk (William Shatner).

Meanwhile, Steve also recalls how the original script was changed in order to ''Trek it up''.

He said: ''Harve Bennett [the producer] said, 'We need to Trek this up. You guys have done an amazing job, but we now need to Trek this up.'

''From what I've read online and what I know we did, the process of 'Treking it up' -- I don't think there were very substantial changes from what we had handed them.

''For us, we just derived a great sense of satisfaction. We always had a lot of pride in our work and this other stuff is kind of irrelevant. It's just interesting the way things go. It just got very political, and that's okay.''