"No Time Like the Past"
The trio steps through the Gateway and emerges in the Alps on Earth in the year 218 B.C. and they see Hannibal's army of Carthage on the way to invade Italy. Hiding in the rocks, Kirk, Spock and McCoy notice that the army is heading away from Italy to surprise the Roman army who was advancing at their rear flank. Obviously Trengur had convinced Hannibal to do so. McCoy grasps the situation, "Great Scott! If he succeeds, he'll wipe out the budding Roman Empire! What will that do to the history of Earth?" Spock replys with "It is beyond extrapolation!" McCoy relates that Trengur's "psych" profile reveals that he'll kill Hannibal when he gets a chance because he's a megalomaniac and can't stand to be ruled by any man.
The trio from the future march out to the army and are quickly taken to Hannibal. They see Trengur and try unsuccessfully to warn Hannibal about Trengur's treachery.
The Romans advance and the battle is begun. Kirk, Spock and McCoy phaser stun their guards and escape back to the future to try to undo Trengur's actions by seeing the results upon their time. Upon beaming up to the Enterprise, they are saluted by Scotty and Uhura who are garbed in different uniforms. After talking to Scotty in the alternate timeline they learn that the Enterprise is not in Starfleet. Scotty refers to Kirk's starfleet uniform and that Kirk'll want to change back out of those silly clothes. Once alone, Spock consults the computer and then debriefs McCoy and Kirk about how history progressed as a result of Trengur's tampering. After Hannibal defeated the Romans, Trengur murdered Hannibal and took over. Later, Great Britain crushed the American colonial uprising in 1776 during which the American General George Washington was slain. Then in the 1940's the Teutonic quest of North America took place. By the mid 21st century, planet Earth had become an armed warlike camp, under the rule of a World dictator known as the Trengur! The Earth was declared an outlaw plant and never was admitted to the Federation. The Starship Enterprise in this strange reality belongs to the Earthfleet not Starfleet and has registry number NCC-2101.
Spock then explains that the mission they were supposedly on was to use the time portal to infiltrate and leave anti-matter bombs in key Starfleet outposts rigged to go off in nine minutes! One of the bombs was also planted on the time portal planet to prevent their sabotage from being undone. McCoy chimes in, "If that planet is destroyed, we'll be trapped here for the rest of our lives!" They agree that they must get back through the time portal right away before it is destroyed. Just then Scotty appears on the screen and asks if they shouldn't be leaving orbit of the planet before the bomb goes off? Spock agrees, then Kirk states that they need to beam down right away. Thinking fast, Spock knocks Kirk out with the Vulcan neck pinch. McCoy is aghast, "Spock! Have you gone completely insane!", "There is no time to explain, Doctor!" Spock replies just before Scotty and a crewman arrive with phasers drawn. Scotty asks what happened and Spock explains that Kirk's behavior turned violent since the mission and he had to be subdued. Scott responds that he also thought the captain's actions were suspicious. Scotty, in fact, was suspicious of Spock and McCoy as well.
Spock assumes command and orders Kirk be brought to sickbay. Spock then went to the bridge and McCoy revived Kirk, explaining how Spock needed to knock him out to convince Scotty that Spock was on his side. McCoy and Kirk realize that they need to contact Spock right away. McCoy tells Spock, with Scotty overhearing, how Kirk somehow contacted bubonic plague and needed to be got rid of before the crew was infected. Spock catches on to the idea and orders Kirk brought to the transporter to be sent down to the planet which was going to explode in moments.
Scotty pulls a phaser on Spock and says, "You and McCoy may also be carrying the plague, you've all got to go." Turning to Scotty, Spock replied, "I never knew you to be so logical, Mr. Scott!" The three are finally beamed to the time-portal planet, and they hastily enter the time portal just as the bomb goes off!
They arrive near Hannibal's army a bit earlier than the last time - just before Trengur told Hannibal of the Romans at their flank. Galvanized into action, Kirk, Spock and McCoy commandeer an elephant and ride toward Trengur's horse. Roughly grabbing the insane escaped dictator from atop his mount, they head towards the cave where they had arrived.
Leaving the elephant behind, the three finally hustle Trengur through the time portal. Once back in their own time, Kirk calls the Enterprise for immediate beam up. In the transporter room Scotty congratulates them. Kirk orders, "Place Trengur in the brig, Scotty, and set a course for Oorego IV!" Scotty answers with, "Aye, aye, sir... But first, if you'll permit me a foolish question... where'd you get those silly clothes," referring to Kirk's alternate universe Earthfleet uniform.