The crew of the Enterprise meets Satan in a universe where magic exists.
While on a science mission in the center of the galaxy, the Enterprise gets caught in a “matter-energy whirlwind” and is sucked into another universe, Wizard of Oz-style.
Because this universe runs on magic instead of science, the Enterprise’s systems start to fail – engines, computers, and life support. A devilish-looking being named Lucien appears and fixes the Enterprise with his magical abilities.
In this universe, in order the master the art of magic, all one needs to do is believe in it (like the movie The Skeleton Key). The crew starts messing in the dark arts, but Lucien tells them to stop, afraid they will attract the attention of his fellow Megans.
The Megans, led by Asmodeus, abduct the Enterprise crew and take them to what appears to be Salem, Massachusetts during the infamous witch trials. Asmodeus explains that Megans once visited Earth in the 17th century to help guide humanity, but were seen as witches and burned at the stake.
Asmodeus proceeds to put humanity on trial for being assholes; Kirk and Spock speak on humanity’s behalf, saying that humans have changed a lot since their last encounter with the Megans and now suck less.
In Defense of Lucifer
The Megans also plan to punish Lucien for hanging out with the Enterprise crew, but Kirk stands up for him. Asmodeus then reveals that Lucien is actually Lucifer – yes, the Lucifer AKA Satan – but Kirk continues his defense, even going as far as using his limited magic ability to fight Asmodeus in a magical duel.
Turns out this was all a test of character, and Kirk (and humanity) passed. The Megans return the Enterprise to its normal universe.
The whole magic element of the episode was really bizarre and felt a bit out of place in Star Trek, with Kirk firing laser beams from his hands and Spock drawing a pentagram on the floor, among other things. But at the same time, this weirdness was incredibly entertaining, and the trial scene at the end made for a very “Trekkian” message.
Lucien is definitely the highlight of the episode. He’s a fun character and I like the twist that, despite being the Devil, he’s actually a pretty nice guy. He also appears to be a prototype of Q, the omnipotent trickster who would appear in the subsequent Star Trek spinoffs, and even put humanity on trial in his first appearance, much like the Megans in this episode!