Star Trek's "The City on the Edge of Forever" is one of the greatest the franchise has to offer. A staple of nearly every best-of episode list, the award-winning story of time, love and despair has enchanted fans since 1967. But the episode and its turbulent creation burned almost every bridge between Star Trek creator Gene Roddenberry and legendary writer Harlan Ellison. Ellison fought to remove his name from the final product, one of the few battles he would lose over his long career.

"The City on the Edge of Forever" sends a manic McCoy through a time portal tended to by a mysterious Guardian. When Spock and Kirk chase after him, they discover that not only is McCoy unlike himself in 1930s Earth but that he's also inadvertently doomed the human race. In fixing time, Kirk falls in love with McCoy's nurse, Edith Keeler -- the woman on whose life all destiny hinges. She has to die, otherwise, the pacifist movement she sparks will allow the Nazis to gain a martial edge, sparking a nuclear holocaust.

RELATED: Star Trek: How the Borg Assimilated the Universe's Most Dangerous Aliens

Ellison's original script for the episode contained a number of familiar core elements, but massive rewrites changed some odd character things and reigned in the budget, which infuriated him. His original script began work ten months earlier, well before the series' bible had been formalized. This meant his inclusion of things like a drug-dealing plot to kick-off events, a firing squad, violent alternate history and even some bizarre behavior on the part of Kirk and Spock weren't what fans would be expecting when the episode finally aired.

Ellison worked with Roddenberry for a number of unpaid rewrites before their relationship began to fray. Alterations for budgetary issues weren't the major sticking point for Ellison, but rewrites that, in his opinion, made McCoy look foolish for accidentally injecting himself and tore out the emotional heart of the story. His original finale saw Kirk willing to sacrifice humanity's future for a chance with Edith, with only Spock's cold logic saving their timeline. To Ellison, this was the key the entire script hinged on -- a love so powerful that it was worth the ultimate destruction.

RELATED: Star Trek: The Next Generation Already Explained ‘Old Man’ Q

In his words, Ellison felt what went to air contained too much of the "dopey utopian bullsh**t" that Roddenberry liked. As a result of the multiple rewrites and because the final result didn't match Harlan's vision, he fought to have his preferred pseudonym, "Cordwainer Bird," credited instead. It was one of Ellison's familiar signals to other writers, that the job was being given the bird, or was about as useful as making shoes for birds. Roddenberry knew letting Harlan, an established name in the industry, take his name off would cause Star Trek to lose its allure for other big-name writers. These Are The Voyages by Marc Cushman and Susan Osborn also suggests that Roddenberry threatened to get Harlan blackballed if he removed his name from the episode. Eventually, Ellison relented, and the final product still bears his name in the credits.

Ellison would give himself plenty of space to air his grievances about the behind-the-scenes fracas, publishing his original version of the script in 1993, and that wasn't the only win he would claim. He also submitted his original script to the Writer's Guild of America, taking home the prize of Best Teleplay during the 1966-1967 awards season. According to Inside Star Trek by Herbert F. Solomon and Robert Justman, Ellison was less than tactful about winning with Roddenberry and the Star Trek producers in attendance. And when the episode won its 1968 Hugo Award for Best Dramatic Presentation, it was still Ellison's name on the prize.

Regardless of a grudge that would last decades, with neither side willing to reconcile, "The City on the Edge of Forever" stays a timeless classic. Ellison passed in 2018, having left an indelible mark on science fiction through his haunting short stories and his consultancy on classics like Babylon 5 and the '80s Twilight Zone reboot. In the end, the real story of a love so strong it could lead to destruction may have been part of Ellison himself.

KEEP READING: Star Trek: 'Spock's Brain' ISN'T the Worst TOS Episode - But It's Close