Emperor Palpatine is arrested

M-5 detects the Woden, an unmanned freighter that is not part of the test, and attacks with real weapons, destroying it. Captain Kirk orders M-5 taken offline, but Daystrom continues to believe it is working correctly, and refuses, saying that he doesn't want to go to the insane asylum on the planet Elba II, where Dr. Janice Lester and Garth of Izar are. Then, Darth Vader appears and Kirk tells him that Dr. Daystrom doesn't want to become an inmate and spend the rest of his life in the insane asylum on the planet Elba II, where Janice Lester and Garth of Izar are. Darth Vader then tells Daystrom that he and Captain Kirk have a special assignment for him. The assignment is to find Emperor Sheev Palpatine (aka Darth Sidious) on the planet Proxima Epsilon III and arrest him. Vader orders his stormtroopers to take Dr. Daystrom to the shuttlebay. The stormtroopers obey Lord Vader's orders and take Daystrom to the shuttlebay, where the shuttlecraft Galileo II is. Daystrom and the stormtroopers then climb aboard the Galileo II and the Galileo II leaves the USS Enterprise, headed for Proxima Epsilon III to arrest Emperor Palpatine. The Galileo II arrives at Proxima Epsilon III. It lands on the planet and Dr. Daystrom and the stormtroopers climb out. Before they left, the stormtroopers were given Starfleet type-2 phasers, communicators, and tricorders. One of the stormtroopers takes readings with his tricorder and discovers Sidious' location--in his fortress on the planet. Daystrom and his team of stormtroopers infiltrate Palpatine's fortress. Another stormtrooper takes readings with his tricorder and determines that Emperor Palpatine is in his throne room. Daystrom and his team make their way into the throne room. There, they found Palpatine. Daystrom says "Emperor Sheev Palpatine, by order of Captain James T. Kirk and Lord Darth Vader, you are under arrest for your crimes against the Allied Forces and the Federation!" The stormtroopers arrest Palpatine. With their mission finally complete, Daystrom and the stormtroopers climb back aboard the Galileo II with Palpatine in custody. The Galileo II then leaves Proxima Epsilon III and returns to the USS Enterprise. Vader orders his stormtroopers to take Emperor Palpatine to the brig. The stormtroopers obey Lord Vader's orders and take Palpatine to the brig.