The Long Night's Dawn!

Summary
Stardate 8124.5: The Enterprise is sent to Goran IV after a Federation probe crashes, potentially causing a toxic gas to form in the atmosphere. Kirk, Spock and McCoy beam down in disguise to determine if the primitive Goranians truly are in danger, or if the cure -- waiting for dispersal aboard the Enterprise -- will prove more harmful than the sickness.

The landing party materializes outside of a village, unaware their arrival has been witnessed by Lori, a young girl with a crippled leg. She reasons that since the trio appeared out of thin air, they must be angels and follows them. In the village, after McCoy seperates to find the local hospital, Kirk collides with a renegade scientist named Gorman. He drops several scrolls, one of which contains a primitive diagram of the solar system which is considered heresy. Spock's attempts to talk to Gorman only gain the attention of the other townsfolk, who declare that anyone talking to the heretic Gorman must also be a heretic. The Clerics, more armed thugs than holy men, quickly arrive to take the landing team into custody. During the ensuing struggle, Spock's hooded disguise is pulled open, revealing his devil-like ears.

Meanwhile, McCoy finds the hospital, with Lori not far behind. He is shocked by the conditions where the doctors/priests leave the patients in agony because that is what the "Supreme Soul" has ordained. Wandering through the ramshackle structure, McCoy finds an elderly man, whom tricorder scans confirm is suffering from early-stage poisoning from the gas. After an injection of the antidote, the man begins to recover. McCoy's success is short-lived, however, when the Clerics burst in to arrest him.

Soon, all three crewmen are being held in the Cathedral, where the Clerics smash the communicators and tricorders. A Cleric finds Lori, who insists the strangers are angels, not devils. The Clerics feel the child has been misled by the devils, and plan to execute them at dawn. They also will "purge" Lori to remove the evil influence. Gorman, eavesdropping at the window, wants to help the strangers for showing him respect reather than fear. He also recognizes that the purging would kill frail Lori. Inside, Lori makes a dive for the shattered Federation gear and is pulled through the window by Gorman. Using his knowledge of the Cathedral's hidden passages, Gorman leads Lori to where the Enterprise crew is being held.

Gorman gives the remains of a communicator to Kirk and Spock in their cell, but it's beyond repair. A length of tritanium wire from the component, however, proves useful to saw through the bolt on the door. They find McCoy's cell, but are forced to escape without him. Rendezvousing at Gorman's hut outside town, Kirk and Spock learn McCoy is to be executed at dawn in a trial-by-water. As Lori takes Kirk to the river, Spock finds that nothing in Gorman's lab can repair his communicator. He does see some chemicals that may prove useful, but he must knock-out Gorman with a neck pinch to use them as he plans.

At the river, McCoy is strapped into a chair mounted on a long pole before the townspeople. The Clerics will dunk him into the river; if he drowns, he was innocent; if he survives, he will be killed as a witch. Dropped into the water, McCoy finds Kirk waiting for him with a knife to cut him free. They float downriver, but not far enough to escape notice. Before they can be recaptured, everyone collapses as the toxic gas takes effect. On the Enterprise, Uhura picks up a faint transmission from Spock, telling Scott to release the antidote.

Sometime later, Kirk wakes up in Gorman's hut, the antidote a success. Spock explains he used the materials and chemicals in Gorman's workshop to construct a rudimentary radio transmitter to contact the ship. He had to knock-out Gorman to prevent him from seeing the device. McCoy easily fixes the gout-like muscle ailment in Lori's leg. Spock reassures Gorman he is on the right track with science over superstition, as the landing party beams back to the Enterprise.