The Devil in the Dark (Star Trek)

On stardate 3196.1, the Federation starship USS Enterprise, under the command of Captain James T. Kirk, is sent to the pergium mining colony on planet Janus VI to investigate reports of a strange creature which recently killed 50 miners with a strong corrosive substance and is destroying equipment.
A landing party consisting of Kirk, Spock, and McCoy beam down to meet with the mine supervisor, Chief Engineer Vanderberg. Vanderberg introduces them to another engineer, Appel, who describes having seen the monster and gives a basic description. He also states that he shot it with his phaser, which had no effect. Spock's curiosity is aroused by a spherical object on Vanderberg's desk; Vanderberg explains that it is one of thousands of silicon nodules found on recently opened levels of the mine, but has no commercial value.
While they talk an alarm sounds, indicating a problem with the nuclear reactor powering the mine. They find the armed guard has been killed and the main circulation pump stolen. The reactor is obsolete, and neither the base nor the Enterprise has a replacement. Chief Engineer Scott improvises a temporary replacement pump, but the original component must be found within 48 hours or the reactor will fail, rendering the mine uninhabitable.
Spock suggests that the creature might be a silicon-based lifeform and would thus be resistant to the "Type I" handheld phasers carried by the colony guards. He then modifies the Enterprises more powerful "Type II" phasers to be effective against such a life form. A number of crewmen are sent into the mine to hunt down the creature, starting on the newly opened Level 23, where the attacks began.
Kirk and Spock soon encounter a creature which looks like an animated clump of partially molten stone. The creature threatens them and receives a direct phaser blast. Injured, it escapes by burrowing quickly through solid rock. Spock examines a piece of the creature knocked off by the phaser and determines that it is indeed silicon-based, and that it secretes a strong acid which allows it to move through rock as easily as humanoids move through air. Spock's tricorder readings show that there is only one creature within a hundred miles. As it is the last of its type, killing it would be a crime against science. Kirk believes the mine is too important, and the creature too dangerous, to let it live.
Scott's improvised pump eventually fails and the colony begins evacuating, but the landing party and some of the miners remain behind to search for the pump and the life form. Kirk discovers a chamber filled with thousands of the silicon nodules and the creature causes the roof to collapse, trapping him. Kirk contacts Spock, who, in a reversal of their previous positions, urges Kirk to kill the creature immediately. However, Kirk realises that the creature is not threatening him and begins to "talk" to it. The creature turns, showing him a large wound in its side.
Spock finds a way into the cavern and attempts a Vulcan mind meld but cannot complete it as the creature is in agony from its wound. However, he does learn that it calls itself a Horta. The Horta also gains enough knowledge from the experience to be able to etch the words "NO KILL I" into a nearby rock. However, Kirk and Spock aren't sure if that means, "Please don't kill me", or "I won't kill you".
Kirk orders Dr. McCoy to come and help the creature while Spock mind melds with it again. Spock discovers that every 50,000 years the entire race of Horta dies, except for one creature who remains to protect the eggs and act as their mother. When the miners broke into the hatchery, it just fought back the only way it knew. McCoy arrives and analyzes the Horta's physiology and finding it is virtually made out of stone, declares: "I'm a doctor, not a bricklayer!" The Horta now understands Kirk is trying to help and tells him the missing pump is in the "Vault of Tomorrow".
Meanwhile, Vanderberg and the miners are being held back by a security detail, but their patience wears thin and they overpower the guards. Kirk stops them from killing the creature and explains that the Horta was simply protecting its eggs, the silicon nodules the miners have been collecting and destroying, which are now on the verge of hatching. Vanderberg regrets the damage his men have caused inadvertently, but is concerned that there will be thousands of those "things" crawling around. Kirk returns the pump and reassures him that the Horta are intelligent and peaceful and suggests they could assist the miners by locating new deposits of minerals in exchange for being left alone. McCoy proudly informs them that he's helped the Horta by using thermo-concrete, which is mostly silicon, as a bandage and reckons that he could probably "cure a rainy day!" Spock mind-melds with the Horta again and it agrees with the proposition. Spock mentions that contact with the highly logical Horta is "curiously refreshing".
As the Enterprise prepares to leave orbit, Vanderberg reports that the eggs have started to hatch and they have already hit huge new pergium deposits, as well as gold and platinum. He says that the Horta are not so bad once you get used to their appearance. Spock mentions to Kirk that the Horta also found humanoid appearance revolting, but he got the impression that she found pointed ears the most attractive 'human' characteristic.