Court Martial

During an ion storm, Captain James T. Kirk of the Federation starship USS Enterprise is forced to eject a research pod containing Lieutenant Commander Benjamin Finney to prevent the destruction of the ship; Finney is presumed dead. The damaged ship makes its way to Starbase 11 for repairs. Commodore Stone, commanding Starbase 11, reviews the ship's records and discovers that Kirk ejected the pod while the ship was at Yellow Alert and not Red Alert as Kirk claimed. Because the ship was not yet in serious danger, Kirk is suspected of intentionally killing Finney. Stone further discovers that much earlier in his career, Kirk had served with Finney aboard the USS Republic and had discovered a mistake Finney had made concerning the antimatter system (which, if left unchecked, would have destroyed the Republic had the ship gone to warp drive). Kirk fixed the error and noted it in the ship's log, causing Finney to be given an official reprimand and sent to the bottom of the promotion list. Ever since this time, Finney has harbored a grudge against Kirk, whom he blames for keeping his career at a standstill. Stone asks Kirk to voluntarily step down as captain of the Enterprise, but Kirk disputes the allegations and demands a trial.

Kirk speaks to Lt. Areel Shaw, a Starfleet Judge Advocate General officer and former girlfriend, seeking legal advice. She reluctantly tells him that she has been assigned to prosecute him. Kirk instead obtains legal representation from Samuel T. Cogley, an eccentric but brilliant trial lawyer. At the trial, both Spock and Dr. McCoy speak on Kirk's behalf, while Finney's daughter Jame (who was named after Captain Kirk) watches from the audience. Cogley puts Kirk on the stand, but again, Kirk's testimony contradicts the computer logs, including a visual recording from the bridge security system that clearly shows Kirk ejecting the pod while the ship was on Yellow Alert. During a recess, Kirk comments that Spock may find a better chess opponent in his next captain, giving Spock an idea.

Mr. Spock discovers that he is able to readily beat the Enterprise computer at three dimensional chess, a program that he had written himself reflecting his knowledge of the game. Given this, each game should have ended in stalemate, but he had beaten the machine four times in a row. He believes the computer has been tampered with. Spock arrives with his findings before the court-martial sentence can be handed down, and notes only three people could alter the computer records aboard the Enterprise: Captain Kirk; himself; and the Records Officer, Lieutenant Commander Finney. Cogley suggests that Finney is not dead, and following an impassioned speech on the rights of man versus the machine, I demand it. I demand it

– the court-martial reconvenes aboard the Enterprise.

After the crew is beamed down to Starbase 11, Dr. McCoy uses a sensitive auditory device tied into the computer that can detect a human heartbeat aboard the ship, and masks out those of the officers involved in the trial. One heartbeat remains, coming from Engineering. Kirk goes there to find Finney, who draws a phaser and gleefully informs him that he has sabotaged the ship so she will drop out of orbit, killing everyone aboard. Kirk is able to momentarily confuse Finney when he says that Jame is also aboard (having previously sent Cogley to fetch Jame in case Finney refused to cooperate), giving him time to wrestle the weapon away from Finney. Kirk gains the upper hand, and a broken Finney reveals his sabotage. As Finney is secured, Kirk undoes the damage, and the ship regains a stable orbit.

Captain Kirk is cleared of all charges and restored to duty. Lieutenant Shaw beams aboard the ship to say farewell, and informs him Sam Cogley will be defending Finney at his trial. She kisses Kirk before the two former lovers go their separate ways.