Doomsday Machine
The "planet killer" was an automated, self-propelled Doomsday Machine capable of destroying entire planets. It was encountered in 2267 by the Federation starships USS Constellation (NCC-1017) and [[USS|Enterprise NCC-1701. Its origins were unknown, but based on its apparent trajectory, it was believed to have come from outside the Milky Way Galaxy.
Discovery
Around stardate 4202.1, the Constellation, under the command of Commodore Matt Decker, encountered massive destruction in System L-370; all seven planets had been utterly destroyed. Proceeding to System L-374 (stardate 4202.3), the ship found three intact planets, and a fourth in the process of breaking up. Orbiting the fourth planet was the planet killer, firing a beam of pure antiprotons at the planet and consuming the planet's rubble as fuel.
As the Constellation approached, it was attacked by the planet killer. The ship's deflector shields were quickly overwhelmed by the onslaught, and the machine proved completely invulnerable to counterattack, because its hull was composed of pure neutronium. The Constellation sustained heavy damage; the main bridge was destroyed, the phaser banks were exhausted, and the warp drive was destroyed, impulse drive severely damaged. In addition, the machine projected a powerful dampening field, cutting off all communications with Starfleet Command, and somehow deactivating the Constellation's antimatter fuel and leaving the ship nearly powerless.
Unable to continue the attack or escape, Decker ordered the crew to evacuate to the third planet in the system. Decker himself remained aboard as the last man. However, having finished consuming the fourth planet, the machine then turned towards the third planet. Decker tried to beam his crew back up, but the machine attacked again, damaging the transporter. He could only watch helplessly as the machine consumed the planet below and killed his entire crew of 400 men and women.
A short time later, the Enterprise, under the command of Captain James T. Kirk, received a faint and garbled distress signal. Unable to make out any words aside from Constellation, she entered system L-374 and found her sister ship drifting and abandoned, with Commodore Decker the sole survivor aboard. Assessing the situation using the Constellation's sensor records taken by Science Officer Masada, Spock projected the weapon's origin. He also determined, based on its present course, that it would enter the most densely populated regions of the Alpha Quadrant, including the nearby Rigel system.
The Battle
As the Enterprise held alongside the Constellation, it was suddenly and swiftly attacked by the planet killer. Although the Enterprise was more maneuverable, the weapon was extremely fast and gaining on its target. In the first volley, the Enterprise took heavy damage, with shields almost exhausted and transporters and communications damaged. While Captain Kirk was trapped with the boarding party aboard the Constellation, Spock ordered evasive action. Commodore Decker, taken aboard the Enterprise for medical treatment, exercised his authority to assume command under Starfleet General Order 104 and countermanded Spock's orders to avoid the machine and seek a clear space to warn Starfleet. With a combination of seeking retribution for the loss of his ship and crew, and the presumption that the nearby Rigel colonies would be the next target of the machine, Decker ordered an immediate attack on the weapon. However, the Enterprise was overwhelmed as quickly as the Constellation had been, and soon trapped by a Tractor Beam which was pulling the ship towards the planet killer's maw.
Meanwhile, on the Constellation, Chief Engineer Montgomery Scott managed to effect partial repairs to the impulse engines and a single phaser bank. Kirk launched a diversionary attack on the Planet Killer that allowed both ships to escape. The planet killer apparently had a relatively simple and straightforward defensive computer program that only allowed it to engage single targets within a specific range. The immediate danger past, Captain Kirk ordered Decker relieved of command of the Enterprise.
As the two Starfleet ships withdrew, the planet killer returned to L-374 and resumed consuming the planetary debris, taking in additional fuel. When Decker gave indications he was going to continue to press the attack despite narrowly avoiding disaster in the previous engagement, he was relieved of command by Spock under direct orders from Kirk on the basis that to continue to press the futile attacks would be indication he was suicidal, and was ordered to report to sickbay for a psychological examination.
Suffering from a mental break-down brought on by extreme stress and the loss of his ship, crew and command, Commodore Decker escaped custody and stole a Type-2 Shuttlecraft from the Enterprise, piloting it on a suicide course directly into the weapon's maw, where it was quickly destroyed. However, the Enterprise sensors detected a small drop in the power output of the planet killer – the shuttlecraft's explosion, however small, had in fact caused some minor damage to the weapon from the inside. Based on this data, Captain Kirk proposed detonating the Constellation 's main impulse engines inside the Planet Killer, creating a much bigger explosion and hopefully causing major damage to the weapon, if not destroying it outright.
As the Enterprise held position near the Planet Killer, outside of weapons range, Kirk piloted the Constellation on a direct course toward the weapon. Beaming out at the last second, he detonated the Constellation's engines directly inside the weapon's maw, bypassing the neutronium hull, and effectively dropping its power output to zero (in essence completely disabling the machine). It should be noted that due to the presence of the seemingly impenetrable neutronium hull, the hulk (or "corpse") of the planet killer was left intact, floating lifelessly in space.
Following the battle, Captain Kirk noted in his log that Commodore Decker gave his life in the line of duty. (TOS|The Doomsday Machine)