Exactly 50 years ago today, the most famous Star Trek episode of all time — “The Trouble With Tribbles” — aired on for the first time. Since 1967, the little furry alien balls who make adorable noises and are born pregnant have achieved legendary status among famous sci-fi creatures. But did you know they were kind of a ripoff?

Though “The Trouble With Tribbles” was penned by the excellent science fiction writer David Gerrold, the concept for the critters themselves actually originated with author Robert Heinlein. Here’s what happened.

In Gerrold’s script, the crew of the starship Enterprise initially perceive that the Tribbles are cute innocuous furballs. However, as the story goes on, Spock and Bones figure out that the trouble with Tribbles is that they can’t stop reproducing. Ecologically, the Tribbles are a menace to the blue space wheat the Enterprise is trying to protect from Klingon sabotage. (Yep, back then the Klingons went undercover to screw with outer space crops.) And so, after the Enterprise and a local space station are overrun by the little critters, Scotty beams all the Tribbles into an engine of a Klingon ship, effectively murdering them because Scotty is hilarious.

Kirk has had it up to here with these damn Tribbles.

Regardless of what you think of that storyline, “The Trouble With Tribbles” became, and remains, the most popular Star Trek episode of all time. This is not the same as saying its the best, just that it’s been voted the most popular of the original series over and over again for five decades. But maybe that’s with good reason. In Edward Gross and Mark Altman’s oral history of Star Trek, The Fifty Year Mission, Gerrold is quoted as saying “…I set out to write the very best episode of Star Trek ever made.”

So, where’s the ripoff? Turns out, the Tribbles are very similar to creatures called “flat cats,” a martian animal from Robert A. Heinlein’s novel The Rolling Stones, published in 1952. Heinlein is, of course, a juggernaut in the field of early science fiction in America, famous for writing Stranger in a Strange Land, Starship Troopers, and possibly inventing the idea of “Bootstraps Paradox” with his short story, “All You Zombies.” In The Rolling Stones, the flat cats are similar to Tribbles insofar as they reproduce like crazy and cause some space-faring folk more than a few headaches.

But, when the Trek studio heads at Paramount and Desilu brought the possible plagiarism to Heinlein’s attention, the author barely minded. In fact, according to his estate and Gerrold, Heinlein just asked for one thing as compensation: a copy of the script, autographed by David Gerrold.

LEFT: Robert Heinlein. CENTER: Paperback cover of 'The Rolling Stones.' RIGHT: David Gerrold with William Shatner on the set of 'Star Trek: The Motion Picture.'

Gerrold, of course, didn’t intend to ripoff off Heinlein, and Heinlein was big-hearted enough to not mind an accidental homage to his flap cats in the creation of the Tribbles.

So, if you rewatch “The Trouble With Tribbles” today, in honor of its birthday, just try to imagine the buttoned-up author of Starship Troopers being delighted to receive an autographed copy of the teleplay in the mail. It will make you smile just as much as all those Tribbles falling on Captain Kirk.

Editor’s note(1/1/2018): Since the publication of this article, fans of both Star Trek and Heinlein have contacted Inverse and pointed out two bits of information that puts the Tribble rip-off in a slightly different light. First, according to the fact-checker hired by the original Star Trek — Kellam de Forest — Trek creator Gene Roddenberry and producer Gene L. Coon were both aware of the possibility of a plagiarism claim prior to the episode being filmed. Second, as revealed in the authorized biography of Robert Heinlein, Heinlein was less-than-pleased when Gerrold sold toy versions of the Tribbles at science fiction conventions. Merchandising hadn’t been covered in the “gentlemen’s agreement” between himself and Coon, making Heinlein feel, in retrospect, that his good nature had been taken advantage of. Thanks to our readers for keeping us honest.

The original Star Trek is streaming on CBS All Access and Netflix.

Photos via CBS