The Galileo Seven (Star Trek)

On stardate 2821.5, the Federation starship USS Enterprise, under the command of Captain James T. Kirk, is en route to Makus III, delivering much-needed medical supplies to be distributed at the plague-ridden New Paris Colony. The ship passes close to a quasar-like formation of four star systems identified as Murasaki 312, which Kirk's standing orders require him to study. Since the Enterprise is not scheduled to rendezvous for five days, Kirk decides to send a science team composed of Science Officer Spock, Chief Medical Officer Dr. McCoy, Chief Engineer Scott, and four other specialists from the crew out in the shuttlecraft, Galileo, to investigate the formation.
Soon after launch, the shuttle is pulled off course and out of the Enterprise '​s sensor range. Spock makes an emergency landing on the planet Taurus II, a rocky, fog-shrouded world in the middle of the Murasaki phenomenon. Crewmembers Latimer and Gaetano scout the area, eventually encountering Taurus II's native inhabitants: giant ape-like men armed with enormous spears and shields.
Latimer is killed when he is impaled by one of the creatures' giant weapons. The others soon come running to investigate, chasing off the creature with phaser fire. When Spock shows more interest in the archaic weapon than Latimer's death, Lieutenant Boma begins to criticize Mr. Spock's methods of command. The crew retreat to the Galileo, only to discover that the creatures seem to be preparing for an organized attack. Despite objections from the others, Spock insists that it should only be necessary to frighten the creatures, not kill them.
Meanwhile, Kirk turns the Enterprise around and heads back to search for the shuttle, despite concerns from Commissioner Ferris, who sternly reminds Kirk of his obligation to deliver the supplies to Makus III as soon as possible. The shuttlecraft Columbus is dispatched to search the planet from orbit. One of the three landing parties sent to search the planet surface returns to the Enterprise with casualties and reports being attacked by the large, furry creatures. Lieutenant Kelowicz, leader of the landing party, explains that the creatures are similar to creatures on Hansen's planet, but are much larger.
Between boulder-throwing attacks by the primitive giants and quarrels amongst themselves, the crew attempt to make repairs on the shuttle. Mr. Scott concludes that he will need to siphon the energy from all the phaser power packs in order to fuel the ship. The frightened crew members do not want to hear they must give up their only means of defence if they are to get off the surface, but they reluctantly hand over the powerpacks.
Scott's repair to the engine is successful and Spock barely manages to get the Galileo off the ground and back into orbit, but by this time the Enterprise has given up the search and is heading back on course to Makus III. However, Kirk decides to follow his orders "to the letter" and orders the Enterprise to proceed at space-normal speed, hoping to catch the Galileo at the last moment.
The shuttle is too low on power to escape the planet's gravity or even to achieve a stable orbit. With communicators scrambled by the ionization from the phenomenon, the Galileo has no way to call the Enterprise for help before it will fall back into the atmosphere and burn up.
Spock gets an idea and decides to dump and ignite all the remaining fuel from the shuttle's engines, although this will shorten the time the shuttle can survive. The giant flare he produces is easily spotted by the sensors of the Enterprise. Kirk turns the ship around once again, and transports the survivors out just moments before the shuttle is destroyed on re-entry.
Back on board the Enterprise, Kirk questions Spock, attempting to get him to admit that he expended the fuel as a result of an emotional outburst. When Spock stoically points out that such a desperate measure was the most logical action, Kirk and the rest of the bridge burst into hysterical laughter.