Shortly thereafter, Mendez greeted Captain Kirk, Mister Spock, and Doctor McCoy, after the USS Enterprise diverted to the starbase. Despite Captain Kirk's insistence that they had received a subspace message from Captain Pike ordering them to travel to Starbase 11, Mendez maintained that the starbase sent no such message, and informed them of Captain Pike's accident, revealing that, in the condition he was in, Pike could not have even asked for the message to be sent. It was soon discovered that the message had been falsified by Spock, who covertly transported Captain Pike to the Enterprise and then commandeered the ship, for the purpose of taking Pike to the planet Talos IV.
Mendez and Kirk pursued the Enterprise in a shuttlecraft, which was taken aboard when Spock realized that the shuttle would soon run out of oxygen if he did not. As traveling to Talos IV was illegal, Mendez and Kirk convened a court martial on Spock's actions, during which they learned about Pike and Spock's previous visit to that planet. It was eventually revealed to Kirk that Mendez's presence on the Enterprise was an illusion created by the Talosians, who felt that the fiction of a court martial would delay Kirk in regaining control of the ship before it reached Talos IV, and that Mendez had never actually left the starbase. Mendez later contacted the Enterprise, revealing that the Talosians had allowed him to be a witness to the evidence presented at the court martial and that, due to the extreme circumstances surrounding Spock's actions, the restriction against traveling to Talos IV had been temporarily lifted. (TOS: "The Menagerie, Part I", "The Menagerie, Part II")