"Operation: Annihilate!" is the last of the first season episodes of Star Trek: The Original Series. It is episode #24, first broadcast April 13, 1967. It is written by Stephen W. Carabatsos, and directed by Herschel Daugherty.
Quick Overview: The crew of the Enterprise exterminate parasitic creatures that have taken over a Federation colony.
Kirk and company, fight off neural parasites in "Operation: Annihilate!"
On stardate 3287.2, the starship USS Enterprise, under the command of Captain James T. Kirk, is sent to investigate Deneva, a colony of one million people, with which the Federation has lost contact. Kirk is especially concerned about the colony because his brother Sam, a research biologist, resides there with his family. Kirk refers to the colony as one of the most beautiful planets he has ever seen.
Mr. Spock finds computer records that indicate an epidemic of mass insanity, caused by neural parasites, has been spreading throughout several planetary colonies in the sector, starting with Beta Portalin, and Lavinius V, then Theta Cygni XII, and Ingrahem B in recent years.
Before entering Deneva's orbit, sensors detect a Denevian ship on a suicide course straight into the sun. An attempt is made to contact the ship's pilot, but all he indicates is that he is "finally free", just before his craft gets vaporized. Lt. Uhura then picks up a distraught message from Aurelan, Kirk's sister-in-law, who pleads for help and then is cut off.
Not wasting time, Kirk beams down with a landing party and security force. They are soon met by a group of men armed with clubs who take a threatening stance, however the men's words and actions don't mix. They keep saying they don't want to harm the party yet continue to make advances. The party immobilizes the attackers with their weapons, then moves on.
The party then responds to a woman's scream, finding Kirk's brother Sam, who is dead, and his wife Aurelan, near death, and nephew Peter, still alive, but in pain. Aurelan is weak, and responds only about "invaders" which cause them pain. Kirk has them beamed aboard the Enterprise for treatment and hopefully more insight as to what is happening.
Once aboard the Enterprise, Aurelan claims a Denevian ship coming home from Ingrahem B, was taken control by strange parasitic creatures that forced the crew to return to Deneva, and from there, spread over the colony. They began forcing the people to give them ships so they could take over more colonies. As Aurelan speaks, the health monitors detect sudden spikes of agonizing pain that occur as she tries to inform the officers of the problem. Eventually, the pain is too much and she dies.
Returning to the planet, a landing party including Kirk, Spock and Dr. McCoy check out a nearby building. Upon entering, they discover hundreds of the strange amoeba-like parasites, (which look like globs of melted plastic), clinging to the walls and ceiling. They can move short distances through the air and use excruciating pain as a means of controlling their victims. The creatures do not show up on tricorder scans, and they are resistant to phaser blasts. Kirk decides to back off, and as the team exits, one of the creatures glides down and attaches to Spock's back. Spock collapses in pain, and McCoy rushes to help him. Kirk orders an immediate beam out and returns to the ship.
Back in sickbay, McCoy closely monitors Spock, discovering the creature has grown new tissue around Spock's nerves which is far to deep for conventional surgery to remove. Spock awakens and rushes to the bridge to take control of the ship. He is subdued and tranqilized. Later he recovers on his own, and says he is using his Vulcan mind control to overcome the pain and is now ready to return to duty. Kirk thinks otherwise, but Spock explains he must return to the planet to capture a parasite specimen, and work on a way to stop them. Eventually, Spock calmly breaks free and attempts to transport to the planet only to be stopped by Scotty who calls for Kirk. Spock says he is the logical choice to send down since he is already infected by the parasite tissue, and more able to withstand the controlling pain than a human.
Kirk reluctantly agrees and sends Spock down. When Spock arrives he is attacked by a pipe wielding maniac, but quickly subdues the assailant, and makes his way to the building where the parasites are gathered. After stunning one with a sustained phaser shot, he places one in a specimen container with a large pair of tweezers and returns it to the ship.
Once there McCoy analyses the creature, discovering that it is just a single-celled organism of enormous size, and that it seems to be part of a larger entity the exists in separate parts. McCoy then tries to determine what can kill the creature which seems to be immune to both heat and radiation. Kirk remembers the suicide pilot that flew into the sun, and suggests that the creatures may be sensitive to intense visible light, if the heat and radiation doesn't harm them. McCoy intensifies the visible light of the spot lamp the specimin is under and the creature quickly dies.
Spock suggests the light may affect the alien tissue on his nerves as well, and volunteers himself put it to the test. So McCoy exposes him to the same light which successfully kills the tissue, however since Spock refused eye protection on account that the colonists themselves will not be protected, he is rendered blind. Testing the results, McCoy is mortified to discover that the ultraviolet spectrum of light is all that was needed. The Enterprise then launches over 200 specially fabricated ultraviolet flares that bathe the planet Deneva with UV radiation, thus killing off all the parasites.
Soon afterward, Spock's eyesight recovers to Dr. McCoy's amazement, saying that he should have been blinded permanently. Spock attributes the recovery to his pair of Vulcan inner eyelids, which his people use to protect their eyes from the harsh sun on their planet.
"Operation: Annihilate! (http://www.memory-alpha.org/en/index.php/Operation:_Annihilate%21)" article at Memory Alpha, a Star Trek wiki