Klingon is officially recognized as the most popular fictional language in the world, and yet it only became part of Star Trek due to a chain of happy coincidences. Star Trek II: The Wrath of Khan is generally seen as a ground-breaking moment in the franchise’s evolution, in part because it tilted more towards action than Gene Roddenberry’s vision of Star Trek as social commentary. But it’s also significant because of the involvement of Marc Okrand, a linguist who specialized in writing closed captions.

According to Okrand, in 1982 he was flown out to Los Angeles to do closed captions for the Oscars. During lunch with a friend from Paramount, he mentioned his background in linguistics, and he was promptly hired to create some Vulcan words for a scene in Star Trek II: The Wrath of Khan. The actors had actually spoken in English, but during post-production, it was decided the scene would be better if they spoke Vulcan rather than a human language. Okrand was tasked with creating a few words in Vulcan that would match the lip movements. It proved to be the beginning of a surprising career turn.

Related: Star Trek Into Darkness Set Up Discovery’s Klingon Problem

How The Klingons Got Their Language In Star Trek

Klingons in Star Trek III The Search for Spock

Klingons appeared in Star Trek: The Original Series, but there they mostly spoke English – with a few guttural-sounding words thrown in that had been created by James Doohan (the actor who played chief engineer Scotty). The Klingons got a visual makeover for Star Trek III: The Search for Spock, and this time the production team wanted them to speak a “real” alien language. Star Trek turned to Okrand again.

Okrand’s task was a complex one. He had to create a brand new fictional language from scratch, based on the handful of sounds heard in Star Trek: The Original Series for consistency’s sake. Okrand grabbed sounds from different languages across the world and then began to switch things up. He put sounds together in his new Klingon language that are entirely distinct on Earth, creating something viewers would have never heard before. He also established an unusual sentence structure, with Klingon preferring object-verb-subject.

The Klingon Language Expanded After Star Trek III: The Search For Spock

Klingon in Star Trek Discovery

Okrand taught the actors how to speak Klingon using tapes and a writing system he created to help. He found the experience of working on the film to be tremendously enjoyable, and so afterwards decided to write up a Klingon Dictionary because he thought the fans might be interested. Okrand had no idea how right he would be.

In a 2018 interview (via CNN), Okrand remembered that creating new words for the dictionary had been more difficult than explaining the grammar. “I decided to not make up any words having anything to do with Klingon geography or Klingon culture,” he explained. “I know it sounds strange to have a dictionary about Klingon that doesn't deal with that aspect, but the reason is that I'm not a writer, I don't write the stories or the movies and I didn't want to make something up that down the road would turn out wrong because of a TV episode or a movie.” This turned out to be an inspired approach because it meant Klingon would not be contradicted by plot points – and the Klingon Dictionary could therefore become a valuable data point for future writers, directors, showrunners, and actors.

Related: Why The Ferengi Never Worked As Star Trek's Klingon Replacements

The Klingons have changed a lot over the years, but the language itself remains – flourishing enough to be recognized by the Guinness Book of Records as the most popular fictional language in the world. The Klingon language continues to expand with every new Star Trek film or TV series, but everything is built on the foundation Okrand established. No other science-fiction franchise has ever gone to these lengths before, and it’s unlikely any other will ever prove as successful in creating an entire alien language from scratch.

Next: Star Trek: The Klingons' Greatest Enemy Were The Tribbles, Not Starfleet