Star Trek: The Corbomite Maneuver

On stardate 1512.2, the USS Enterprise, commanded by Captain James T. Kirk, finishes a third day of mapping stars when novice navigator Lt. Dave Bailey (Anthony Call) encounters a large spinning colored cube floating in space. Helmsman Sulu sounds an alert.
Down in sick bay, Dr. McCoy is giving Captain Kirk his annual physical exam. McCoy notices the flashing alert light, but does not mention it to Kirk. Kirk is annoyed that McCoy didn't mention the light, where McCoy stubbornly states that he isn't about to jump and panic over every alert. Spock calls to inform Kirk about the cube, which is holding steady.
On the bridge, Mr. Scott studies the cube but is at a loss to how it works. A nervous and inexperienced Bailey advocates attacking it with phasers. Kirk arrives and instead orders the ship to back away from the object. The cube responds by coming even closer and emitting harmful radiation. Kirk is finally forced to destroy it.
In Kirk's quarters afterward, Yeoman Rand brings Kirk an unappetizing salad, as per Dr. McCoy's medical orders. McCoy tells the Captain he restricted his diet because he has gained weight. In the midst of a series of attack drills, Sulu overrides the simulations, and Spock informs the Captain that a much larger object is rapidly approaching.
Responding to the object's destruction – which the crew soon learn was a boundary marker – a gigantic glowing sphere quickly approaches the Enterprise. It fills the bridge viewscreen, even at low magnification. The vessel's controller, Balok, identifies his ship as the Fesarius, the flagship of the "First Federation."
Mr. Spock manages to get a visual of Balok, a grotesque, green-skinned humanoid with a frightening face. Balok ignores Kirk's greetings, and announces that he will destroy the Enterprise for trespassing into First Federation territory and destroying the marker buoy. Balok informs the crew they have ten minutes to pray to their deities before their demise.
It was during this agonized wait for their destruction that Bailey finally gives-in to his fears. He rants irrationally, even when Sulu makes note of the time remaining. Having enough of Bailey's tantrum, Kirk orders him off the bridge.
Mr. Spock compares the situation to a game of chess; "In chess, when one player is checkmated, the game is over" and regrets that he can find no logical answer. Kirk replies that the solution is not chess, but poker. He bluffs Balok telling him that the Enterprise has incorporated into it a substance known as Corbomite which is a material and a device that prevents attack, because if any destructive energy touches the vessel, a reverse reaction of equal strength is created, destroying the attacker.
Apparently falling for the ruse, Balok does not destroy the ship as previously announced. During the pause, Bailey, now calmer, returns to the bridge and requests to return to his station, which Kirk agrees to. Afterward, Balok makes direct contact with the Enterprise, requesting details on the Corbomite device. After allowing sufficient time, mostly to cause Balok to worry the details, Kirk refuses.
A tug ship then detaches from the Fesarius and tows the Enterprise deep into First Federation space, where Balok announces he will intern the crew and destroy the Enterprise. Under tow, Kirk orders the Enterprise to increasingly resist the tug ship's tractor beam. Just as the Enterprise's engines are about to explode from the overload, it breaks free. This disables the alien vessel. With the power supply nearly drained, the tug cannot even call for help from the bigger ship.
Rather than flee, Kirk, McCoy, and Bailey form a landing party to render assistance. Scotty, operating the transporter, tells them to bend down, as the scan on the alien ship reveals it has a very low ceiling and they have to "stoop" over. Beaming over, they quickly discover that the 'Balok' who appeared on their monitor is just a dummy. The real Balok then makes himself known, resembling a hyperintelligent human child. He enthusiastically welcomes them aboard, offering them "tranya," his favorite beverage.
Balok explains that he was merely testing the Enterprise and its crew, to discover their true intentions. Although he had read the Enterprise computer records, he felt they could have been a deception. He created his dummy alter-ego, as he knew his true appearance would never frighten anyone.
Kirk and company finally relax. Balok says that he runs the Fesarius entirely by himself and greatly misses company and conversation. He expresses his desire to learn more about humans and their culture, and Lt. Bailey is volunteered by Kirk to remain on Balok's ship as an emissary of the Federation.