Shear bursts from the sand and throws her razor boomerang at Max, but as he ducks, she flies past and grabs for Zahrah, only to be tackled by Aladdin. As the 39 Thieves approach, the D-Team and Zahrah escape, Shear flying off and leaving Aladdin to be captured.
In her Pod Ship, Shear demands a new dinosaur card from Seth, since she lost Lexovisaurus to the D-Team. However, he suggests taking an Isisaurus already in the area not under anyone's control. Reaching the half-buried Genie, the D-Team blames Aladdin for the ambush, but Zahrah doesn't, also deciding to enter the palace directly, Genie rising from the sand to help. Aladdin is locked in the dungeon, getting extra terrified by the scared ramblings of Dr. Z in the next cell; overhearing from above, the Alpha Trio plot to retrieve their Alpha Scanners. They send Zander to retrieve them from a table in the throne room while Zayid apologizes to Rasheed for losing the princess again, Ed noticing a red jewel in the tapestry behind the throne; Ursula celebrates at finding the apparent Cosmos Stone and gets noticed, the three fleeing with the Scanners as Zayid is distracted by Genie's arrival. They get caught anyway, and are ordered to battle Genie; they agree in exchange for the red stone. The D-Team hop down to fight.
Rex and Max are still obsessing over protecting and helping Zahrah to Zoe's annoyance, Genie walking around the battle, but Shear flies up, her Pod Ship emitting a glowing pink stream that applies Spectral Armor onto Genie, snatching Zahrah when he throws her off and demanding the Cosmos Stone's location. Aladdin picks the locks on the cells, freeing Dr. Z, who he thinks is the Sultan, and then freeing the actual Sultan after Dr. Z flees; Genie's new Hydro Cutter then slices the palace's water tower and floods the dungeon. Seeing this, Zahrah relents, and Shear easily defeats the Alpha Trio (who fall into the flooded dungeon reaching for their cards).
Max and Rex leave Genie to Zoe as they follow Shear. Zahrah shows Shear to the tapestry jewel, which matches the description everyone's after; however, it's not a Cosmos Stone, and Shear shatters it, Zahrah fleeing. Max and Rex instead find Rasheed, resummoning their dinosaurs to corner him as the Sultan arrives to arrest him. Shear puts Zahrah on the edge of the roof to get the real Cosmos Stone's location, but Aladdin lassos Shear, and without wings she rolls down the building. Zahrah gives him a kiss on the cheek in thanks, shattering the watching Max and Rex, as they realize they weren't special and kisses were just her way of being friendly. They reenter the battle with Genie as Paris is defeated, defeating Genie with a dual Ultimate attack. However, as he returns to his card, the Red Cosmos Stone falls out, everyone racing for it before it falls into a large hole, landing among the Alpha Gang trying to climb out. Suddenly, Helga drops from the Backlander into the hole and steps on it, here to retrieve the Alpha Gang and start their sand-filled laundry. Being a robot, she harmlessly picks up the Cosmos Stone and puts it in her pocket, the group teleporting back up. Shear leaves, thinking of a way to blame losing the Stone on Gabbro.
With the 39 Thieves captured and the Sultan restored to power, the D-Team says goodbye, Zahrah kissing each of them and their dinos in thanks, shattering Aladdin, a look the boys recognize. Zoe explains what happened to Genie, now safe in his card, who they take with them. and the group is teleported up, the Backlander leaving into the time vortex.
The Alpha Gang apologizes for teaming with the Thieves as Helga does laundry. Max sees the Red Cosmos Stone on the wall and carelessly grabs it, getting zapped…
D-Team vs. Alpha Gang
The Alpha Trio summon Terry, Spiny, and Tank to block Genie, the D-Team summoning Chomp, Ace, and Paris. The teams charge, Terry and Chomp bouncing off each other before Terry knocks Chomp away with his tail; Ace tries swiping past Spiny but is knocked aside; and Paris and Tank smack tails.
No result (interrupted)
Alpha Gang vs. Shear/Genie
Spectral Armor Genie tries stepping on the Alpha Trio, who upgrade their dinosaurs to their DinoTector forms. They charge, and Genie knocks them all back with his tail. Genie rears, knocking Tank and Spiny down again, charging but getting blocked by Terry, who can barely hold him back.
Terry is shoved back, using Heat Eruption, but Genie uses Hydro Cutter, Terry dodging the attack, which cuts the top off the palace water tower. With Zahrah relenting, Genie defeats Tank, Terry, and Spiny with three more Hydro Cutters. Shear leaves to find the Cosmos Stone, keeping Genie in the fight.
D-Team vs. Shear/Genie
Max and Rex leave the battle to Zoe while they follow Shear and Zahrah, Genie approaching. They quickly recall Chomp and Ace to confront Rasheed, startling Paris; she jumps back to avoid a stomp, getting upgraded to DinoTector Paris and using Metal Wing.
Shear is lassoed by Aladdin, saving Zahrah. Genie dodges and knocks away the Pteranodon trio with his head, Paris ramming him when he turns to Zoe. He stamps her down, stomping until she's defeated, then swings his tail at the roof Zahrah is on. She pleads for him to stop, but the Spectral Armor won't let him listen.
Max and Rex resummon DinoTector Chomp and Ace into the battle, using Ultimate Thunder and Ultimate Wind to hit Genie at once as he charges them, destroying his Spectral Armor. As he returns to his card, the Red Cosmos Stone falls to the ground. Zoe reclaims its card
-Zahrah: "Take us to the palace, Genie. But be careful not to step on anybody."
- Despite him not introducing himself last episode, the D-Team suddenly know Aladdin's name here, likely a script/dubbing oversight.
- It is revealed that the Space Pirates can control dinosaurs and give them Spectral Armor even if they didn't summon them. However, given the wording of Seth's suggestion citing Genie as not being controlled by anyone, it can be assumed that dinosaurs that have already been summoned by a Stone Tablet are immune to this control.
- This is the last episode in the series in which the D-Team and Alpha Gang fight against each other.
- Given that the front of Hydro Cutter shows an Isisaurus with Spectral Armor (in fact a shot from the scene of its use in this episode), the Move Card cannot have been in Genie's Capsule, as Dr. Z created those Move Cards in Season 1 when he knew nothing about Spectral Armor.
- Its origin, however, is uncertain, as it clearly appears in Shear's hand only after taking control of Genie, implying she didn't have it before, but this leaves few options, unless the Spectral Armor itself created the card.
- Although Spiny later uses Hydro Cutter, it's not known if it was the same copy of the Move that Genie uses in this episode, as that card didn't float to the ground with Genie's when he was defeated. It's possible Dr. Z later made a second copy of the Move for Spiny to use.
- With the defeat of Tank by Genie, all six main dinosaurs have been defeated at least once in season 2.
- Paris is the first D-Team dinosaur to be defeated with her DinoTector Armor, by the controlled Genie.
- During the fight when Zahrah tries to calm Genie down, the Space Pirate crystal on his forehead glows, seeming to indicate that Zahrah's words might have brought Genie to his senses, but the control strengthened again and he raged on.
- With the help of Ace to defeat Genie, Terry remains the only one of the six main dinosaurs to not defeat a sauropod during the series.