The Magicks of Megas-Tu (episode)
While investigating the theory of creation, the Enterprise is caught inside an energy/matter tornado. After emerging from the storm, the crew encounter a world where magic works and science doesn't.

Summary
"Captain's log, stardate 1254.4. For years scientists have theorized that if our galaxy was created from a great explosion then the center of the galaxy might still be creating new matter. The  is now on a science mission to investigate. It's an awesome thought that we may actually witness matter being created."

The Enterprise is sent on a scientific mission to find the creation point, an area in the galactic core where matter was being created. Upon arrival, the starship is caught in what Spock described as a matter-energy whirlwind and thrown into an alternate universe. All of the ship's computers and systems begin to fail, and the crew start to lose consciousness due to the lack of oxygen.

Suddenly, a red-skinned humanoid with small horns on his head appears on the bridge. He repairs the systems and welcomes the crew as if they were old friends, but preaches caution. He takes Kirk, Spock, and McCoy to his planet, Megas-Tu, where he explains to them that Megas-Tu is not governed by the same physical laws as their own universe and that magic thrived here. He then sends them back to the Enterprise, seeming afraid that someone might discover them.

"Captain's log, supplemental. In this incredible universe it appears to be part of the natural laws that belief is as potent a force as energy and matter are in our own."

Back on board, some of the crew begin experimenting with magic, starting with Spock. It is discovered by the crew that in this universe, belief is as real as matter and energy. Spock explores these new abilities by drawing a mystic symbol on the floor, and while standing in it, uses the power of his belief to move a Vulcan chess piece; and Sulu uses magic to conjure up a beautiful woman. Lucien reappears, telling them that using these mental powers would attract unwanted attention. His warning is too late – the Megans have noticed the activity and arrive in non-corporeal form on the Enterprise.

The crew is transported to what appears to be Salem, Massachusetts, in what seems to be the middle of a witch trial. The prosecutor, Asmodeus, explains that the Megans had gone to Earth many years prior in search of companions (as there were no other lifeforms in their own universe who practiced magic), but they were met with hatred and fear, and eventually driven out, accused of witchcraft. The remaining few gathered together, and combining their powers, were able to return to Megas-Tu.

At the trial, Spock volunteers to speak in defense of the Humans, since he is not from Earth. Kirk also explains how much Humanity has grown since 1691, trying to accept all forms of life with an open mind. Kirk invites Asmodeus to view the ship's computer, which convinces him that Humanity has changed, and that they should go free.

However, the Megans are now putting Lucien on trial for bringing evil to their planet, since they expect that the Enterprise would bring more Humans to their world. Lucien's punishment would be condemnation to Limbo for eternity. Spock and Kirk defend Lucien's actions, but their words do nothing to convince the court. Seeing no other course of action, Kirk uses magic himself, against Asmodeus, in defense of Lucien, despite the knowledge that he cannot win. He explains that the Megans are in danger of becoming like the Humans they so feared. Despite the knowledge that Lucien was the inspiration, or even the embodiment of Lucifer, Kirk continues to defend him, stating that he would give his life to save Lucien. This impresses the Megans, and they gave Lucien his freedom.

The Megans tell Kirk that, if any other Humans made it to their planet, they would be welcomed, and the Enterprise is returned to its proper universe. McCoy asks Kirk if he believes that Lucien was really Lucifer. Kirk asks if that really matters, but Spock tells the captain that it may be significant, as this would be the second time Lucifer was cast out. However, thanks to Kirk, it would be the first time he was saved.

Log entries 
 Captain's log, USS Enterprise (NCC-1701), 2269

Memorable quotes
"Ah, Humans. Lovely, primitive Humans. Can't you do anything right?"
 - Lucien

"Children will play."
 - Lucien

"These are the defendants, as representatives of the vilest species in all the universe, treacherous Humanity."
 - Megas prosecutor

"Know that once, upon your world, I was known as Asmodeus, he who sees all. Gaze upon my countenance so that you too may see."
 - Megas prosecutor

"Captain, good captain! Always so curious, that must be why I've always liked you Earthlings so much!"
 - Lucien, to Kirk

"Some Humans would attempt to use us to gain power... to serve their own greed and lust. When we refused to serve them they turned against us and taught other Humans to fear us, to hate. They called us devils, warlocks, evil sorcerers. Those of us who survived came to the town of Salem in Massachusetts as settlers and tried to live like other men."
"But you made mistakes, used your powers..."
"And burned for it. Burned!"
"As witches."
 - Asmodeus, Spock, and Kirk

"Knowledge is freedom."
 - Kirk

"We massed together outside the town, immersed ourselves in Megan lore, revived ourselves enough to unite our minds and reach into our own Universe, and tap enough of its power to return from your hellish Earth to Megas-Tu."
 - Asmodeus

"Protect yourselves?! Is that all Human beings ever think about? I'll take care of you. That's what friends are for. All this mental energy you're using, It can be traced. You'll be found."
"Have been found!! So... the people of Earth would spread the evil to our home?! We are ready for Human perfidy this time!! This time, it is the Humans who shall suffer... the Humans, and you, Lucien, who shall pay!!"
 - Lucien and Megan Spirits

"Do you think Lucien really was the demon some men call Lucifer?"
"Does it really matter, Bones?"
"It just might, captain. If he was, this would be the second time Lucifer was cast out, and, thanks to you, the first time he was saved."
 - McCoy, Kirk, and Spock

Background information

Story and script
 This episode's writer, Larry Brody, also wrote the story for .
 After D.C. Fontana invited him to write an episode for , Larry Brody considered the possible stories he could suggest. He later said, "I stayed up for a couple of nights, thinking of all the episodes I'd always wanted to see on the show but hadn't."  Brody also remarked, "I had some ideas that I'd always had for years about what Star Trek as a series should have, so I was ready to go with them." ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD) Three days after Fontana presented the invite to Brody, he visited her office at Filmation, prepared to pitch his ideas. Rather than listen to these herself, Fontana took a nervous Larry Brody to Gene Roddenberry's office. Since Roddenberry instructed Brody to explain his ideas quickly, the young writer did so, detailing the genesis of this episode as well as two other plot concepts.  This incident, the first meeting between Roddenberry and Brody, took place in . (Turning Points in Television, p. 126)
 The idea that ultimately became this episode was Larry Brody's favorite of the three story-germs that he pitched. ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD) In fact, he had unsuccessfully pitched the story for the third season of the original Star Trek series, in . Brody recalled, "Three years later there I was, sitting in that Filmation office with Gene Roddenberry. Pitching him the same episode [....] Unsure of whether he'd ever seen, read, or heard of my old script." (Turning Points in Television, p. 129) The plot concerned the Enterprise encountering God in space and was already, by this point in 1972, entitled "The Magicks of Megas-Tu". ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD; )
 Gene Roddenberry liked the thought of the Enterprise being confronted by God. "Gene thought that was the greatest thing he'd ever heard of," noted Brody. "He said, 'I've been trying, for years, to just get that out in that way. I never really thought about just doing it. So, all right, let's do that." ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD) Additionally, Brody recalled Roddenberry smiling and saying, "I've always wanted to write about the Enterprise meeting God, but NBC's primetime bosses always shot it down. Let's see if we can slip it past the daytime boys." Brody was pleased that the discussion about his plot idea had apparently revealed a kindred spirit. (Turning Points in Television, pp. 129 & 130) Roddenberry also approved of the story's title. Brody later remembered him having said, "Good title. I like it."  Agreeing to make a deal for Brody to write the episode, Roddenberry advised the writer to return home and begin to flesh out the installment, which Roddenberry seemed to eagerly anticipate reading. ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD; )
 In compliance with Gene Roddenberry's instructions, Larry Brody continued to work on the episode after returning home. "I started thinking about exactly what could happen and why," he remembered. "I wasn't the same writer I'd been when I'd tried this before. I'd learned much more about the craft and knew that this time around the script would be a hundred times better." (Turning Points in Television, p. 130)
 According to Bjo Trimble, an initial moment from this installment referenced a "blinding flash of light" that NBC's broadcast standards found to be "unacceptable." A memo circulated and partly read, "Blinding flashes of light are reserved to God." None of the characters actually stated, "Holy cow! The ship exploded into a blinding flash of light," Trimble explained. "The writer merely indicated to the artist what kind of explosion he had envisioned." Despite this, the censors at NBC were still displeased and the blinding reference therefore had to be dimmed. Trimble concluded that the concept of "finding God" became "finding magic." 
 Larry Brody received news of this change shortly after the pitch meeting. "A week later, Dorothy [Fontana] called me," reflected Larry Brody, "and said, 'The good news is that we're making a deal and you're gonna write that episode we talked about. The bad news is we can't use God... but we can use the Devil.' So, it became [...] a story about a planet of devils." ("Drawn to the Final Frontier - The Making of Star Trek: The Animated Series", TAS DVD) Brody said about his initial idea of using God in the story, "The NBC 'daytime boys' had nixed that as quickly as their prime time counterparts would've. But writing about Kirk and Spock and McCoy and the rest of the crew meeting the Devil in outer space was just fine. So that's what I did." (Turning Points in Television, p. 130) Brody likened the situation to his experience of having served as producer of the NBC series , during which he found that the network did not approve of showing a married policeman engage in sexual activity with his wife but did conditionally accept the series showing sex between a cop and a mistress. "If you can show immoral sex instead of moral sex on TV," said Brody, "you can also show Satan instead of God on Star Trek, I guess." 
 This episode's story outline was submitted on . However, the story went through several stages. Larry Brody explained, "I [...] turned in my story outline. Later, I wrote a first draft. And a second. Between each step was the compulsory meeting, but not with Gene. Always, it was Dorothy Fontana and Larry Brody, sitting in her office while Dorothy told me what changes Gene wanted me to make. Always, I made them, doing the best I could." Brody had some difficulty understanding what Roddenberry meant in his notes, but the young writer was too nervous to call him and ask.  Brody also remembered, "I did the story a couple of times." 
 Larry Brody eventually completed his work on this episode and the installment's final script draft (which was ultimately composed of 34 pages) was submitted on . The teleplay continued to be revised past that date, though, with one revision made on 25 May. Following Brody's work on the script, Gene Roddenberry continued to work on it, rewriting much of the episode.  Brody offered, "I asked Dorothy to see the final draft. She said 'Gene's rewriting it, but it has nothing to do with you. He always does rewrites.' But the story wasn't changed, and if there were clever jokes, they remained in. The changes mostly involved dialogue."  Not until later did Brody learn of the extent to which Roddenberry was rewriting the teleplay, however.  "When they sent me the final draft [...] every single description and every line of dialogue was changed," Brody recalled. "But my name and only my name was still on the cover as that of the writer." (Turning Points in Television, p. 130)
 This episode's script initially describes Lucien as "an alien, half-goat, half-man, complete with cloven hooves, horns, and tail. He is the image of all the goatgods of supernatural mythology, bearded and broad, with a strange red glint in his eyes. He looks about fifty years old, and there is a wonderful vigor about him." He is also said to have "a voice like thunder" and the script later refers to him as "the goat-man".
 Megas-Tu, as viewed from space, is repeatedly characterized as "candy-striped". The city on the planet is described as "More than a city, a fairyland into which the forest, by all laws of perspective, should extend but does not." Additionally, the city is said to have "glimmering streets".
 Despite Spock dating the recreation of Salem as being from about 1691, the episode's script states the town is from "circa 1650 or so."
 The character of Asmodeus is consistently referred to as "Megan Prosecutor" in the script, which introduces him by saying he is "tall, glowering, wearing a wide-brimmed hat, the image of  as seen in history texts." Evidently, this prosecutor's name, as is suggested by some of his dialogue, was taken from a pre-existing mythological being. (For more information, see . Gene Roddenberry would revisit the character of Asmodeus in his unsold 1977 pilot Spectre.
 The script defines the historical paraphernalia that Asmodeus brings into existence as "the records section of the Enterprise [....] tapes, computer cards, microfilm reels".
 The teleplay also includes notations for the pronunciations of two words: "Megans" and "Megas-Tu".

Cast
 The cast recording session for this episode was accessible to the installment's writer. Larry Brody explained, "Gene called to invite me to the voice recording session on the episode so I could meet Bill Shatner and Leonard Nimoy and the other actors." (Turning Points in Television, p. 130)
 Having found TOS enjoyable, Asmodeus actor Ed Bishop was "delighted" to take part in this episode. ()

Continuity
 This is the only episode of the series to feature Earth.
 The stardate of this episode, 1254.4, is a lower-numbered stardate than that of the second pilot for , , which has a stardate of 1312.4. Due to the ambiguous interpretation of stardates, it cannot be assumed that this episode takes place prior to the other. Nor is the stardate here assumed to be an error.
 This outing, with its theme of magic, has a precedent in the form of . According to Larry Brody, Gene Roddenberry cited this connection during their pitch meeting. Brody later remembered Roddenberry having said, "We tried to do a show on magic the second year of the series. Antoinette Bower guest-starred. But we were limited then, by the fact that we couldn't do the special effects we wanted. Now we can do it all!"

Reception
 Shortly prior to the first airing of this episode, D.C. Fontana called Larry Brody to notify him of the installment's forthcoming telecast and to relay comments from Gene Roddenberry. Brody explained, "She told me that Gene had truly loved my script. 'It was his favorite,' she said. 'He thinks you're brilliant!' Filled with pride, that Saturday morning I sat down to watch the show. The characters were right there, just as I'd imagined them. So were the events. But not one word of dialog was mine." Brody was perplexed and disappointed that Roddenberry had rewritten so much of the script and, after the program ended, he called Fontana at home, puzzled about what had happened to the episode's teleplay. Fontana explained that, even though Roddenberry had made many alterations to the script, he had still loved Brody's final version of it, while also wanting to personally oversee every facet of the episode (as it was a part of "his" fictional universe of Star Trek). 
 D.C. Fontana was aware that the theme of this outing was highly controversial; "It caused quite a bit of consternation [...] It was about the Devil, and the Devil has problems, you know? [...] But we were also saying, 'If there's a devil, then there must be a God.' But a lot of people took offense to the fact that we were supposedly showing the Devil in a sympathetic manner." Despite this, Fontana herself thought the outing "was still a good episode."  She has repeatedly cited it as one of her favorite installments of Star Trek: The Animated Series (along with , , , and ). (; )
 The editors of Trek magazine collectively scored this episode 3 out of 5 stars (a rating that they termed "good"). (The Best of Trek #1, p. 110)
 In their unofficial reference book Trek Navigator: The Ultimate Guide to the Entire Trek Saga (p. 134), co-writers Mark A. Altman and Edward Gross both rate this episode 3 out of 4 stars (which they also define as "good").
  commented about this installment, "The storyline, which features a magicians' battle, takes full advantage of the show's animated nature."
 In the "Ultimate Guide" , this episode was rated only 1 out of 5 Starfleet arrowhead insignia. As such, this was one of the lowest-rated animated installments in the magazine (together with  and , both of which also scored 1 out of 5).

Adaptation
 This episode was adapted into short-story form by Alan Dean Foster in Star Trek Log 3. As such, its stardate was changed to 5524.5 and the events of its narrative were described as being set after both  and , though this does not match the sequence of the actual episodes, in which this installment comes immediately before the other two.

Video and DVD releases
 UK VHS release (CIC Video): Volume 3, catalog number VHR 2537, 
 As part of the The Animated Series DVD collection
 As part of the The Animated Series Blu-ray collection

Links and references

Starring
 William Shatner as Captain Kirk
 Leonard Nimoy as Mr. Spock
And
 DeForest Kelley as Dr. McCoy

Also starring
 George Takei as
 Sulu
 Megan voice
 Nichelle Nichols as Uhura
 James Doohan as
 Scott
 Lucien

Guest star
 Ed Bishop as Asmodeus

Background characters 
 Arex
 Chapel
 Female operations division officer
 Male command division officer
 Numerous Megans
 Sulu's companion

References 
13th century; 16th century; 17th century; 1691; accident; advisor; "allow me"; ancestor; ancients; antimatter; apple; "at hand"; "at your disposal";  battery; belief; Big Bang; "Bones"; castle; century; charting scanners; chess piece; children; choice; chronometer; citizen; cloud; companionship; compassion; coordinates; court; creation point; cruelty; custom; defendant; ; deflector screen ("deflector"); demon; devil; dimension;  dream; dust; drawing; Earth; Earth history; elf; emergency power; emergency battery power; emergency reverse power; energy; engine; envy; eternity; ethics; evil; experience; explosion; ; face; fear; Federation history; film; folklore; friend; friendship; galactic core; General Order 1; generalist; "good luck"; greed; hellish; historical record; home; ; Human (Earthling, Earthman, or Humanity); ignorance; imagination; "In order to"; inspection; intention; "in the name of sanity"; "I see"; judge; justice; knowledge; learning; legend; life support system; lifeform; limbo; logic; loneliness; love philtre; Lucifer; lust; magic; Massachusetts; matter; matter-energy whirlwind; medical tricorder; Megas-Tu; Megan; Megan lore; Milky Way Galaxy; millennia; mind; mystic symbol; mythology; "no way"; "of course"; outsider; oxygen; pain; pentacle; perfidy; phenomenon; place; ; proof; prosecutor; punch card; question; record; ; representative; respect; reverse power; Rhadamanthus; right; rival; ; room; rule; ruse; Salem; Salem witch trials; satyr; science mission; science survey; scientist; search; settler; society; sorcerer; sorcerer-contractor; sorrow; space; specialist; stable; starship; stocks; storm; story; subspace radio; symbol; ; terror; thing; "those were the days"; time; theory; thought; toast; town; trial; understanding; universe; vote; Vulcan chess; warlock; wisdom; witch; witness; wizard; year; yellow alert

External links 

 
 
 

de:Das Geheimnis von Megas-Tu
es:The Magicks of Megas-Tu
fr:The Magicks of Megas-Tu (épisode)
it:Le magie dei Megas-Tu (episodio)
nl:The Magicks of Megas-tu
pl:The Magicks of Megas-tu
Magicks of Megas-tu, The