As Ash prepares for his Olivine Gym battle, he and the others come across a giant Wobbuffet. It turns out to be a Team Rocket "Wobbu Warrior" robot, used for—what else?—trying to capture Pikachu. Jasmine's Steelix comes to the rescue, cracking the robot's shell, freeing Pikachu, and sending Team Rocket blasting off again.
At the Gym, Janina sets out the rules of the match: a two-by-two battle. Ash begins the match by using Pikachu against Jasmine's Magnemite. Pikachu takes an attack so it can hit the dodging Magnemite, then follows with Quick Attack to knock Magnemite out! Jasmine then sends out Steelix, which takes an early hit. It then manages to knock Pikachu out with its Iron Tail. Ash sends out Cyndaquil as his last Pokémon, trying to beat the Steel type with fire. Steelix digs itself underground and attacks, but Cyndaquil avoids it by using its Flamethrower against the wall for a quick direction change! Cyndaquil then takes a hit from Steelix's Iron Tail, but refuses to give up. Its Flamethrower turns Steelix's Sandstorm into a flaming whirlwind—knocking it out, and giving Ash the victory and the Mineral Badge!
After the battle, Ash and the gang decide where they will go next: Mahogany Town. To get there, they will cut through Ecruteak City. After saying goodbye to Janina and Jasmine, they're on their way!
Brock and Misty are at the Pokémon Center packing things in readiness when Janina comes by. She notices that Ash is missing, but his friends take Janina to see Ash while he does a morning run with his Pokémon. Ash finishes up his seaside exercises and joins Janina and the others to venture over to the Olivine Gym.
They walk a short distance, but a large Wobbuffet statue is blocking the way. Ash spots a little plaque in front, and it reads to place your prized Pokémon here for some superstitious thing. Ash puts Pikachu on top and the statue's eyes glow. Suddenly, a spring shoots Pikachu into the statue's mouth which reveals it's another one of Team Rocket's traps. The statue drives away using its concealed treads. Ash has Bayleef use Razor Leaf at the bot, but it proves ineffective against the mecha's titanium walls. While driving off with their catch, Jessie recalls the time she couldn't get a new pencil case, supposedly indestructible to even a Snorlax stomping on them. Janina and Brock call on their Onix, but the joint Tackle fails. The Wobbuffet mecha persists to scale one of the cliffs, but a Steelix emerges from the ground and knocks the mecha downwards. Ash checks his Pokédex for information on Steelix, and soon its Trainer, Jasmine appears on the scene. Brock then recites his own Pokédex entry for Jasmine. Steelix Crunches onto the Wobbuffet robot, and eventually it begins to fracture open. Bayleef retrieves Pikachu with her Vine Whip. Steelix sends the robot sky high with an Iron Tail causing it to blow up and send Team Rocket blasting off.
Afterwards, Jasmine warns Ash that she won't be going easy on him. Ash admits he is fine with that. Soon everyone arrives at the Olivine Gym. Janina assumes the role of referee and declares the rules of the match, a two-on-two battle with no time limit. Jasmine calls out her Magnemite and Ash sends out Pikachu. Pikachu starts it off with a Thunderbolt, but Magnemite simply evades. Magnemite throws down a Thunder Wave back at Pikachu, Pikachu dodging as well. Magnemite is worryingly fast and evades several Thunderbolt attacks with ease. Pikachu also dodges Magnemite's Thunder Waves. Ash decides to take a direct hit from Magnemite. The tactic works as Magnemite is too exhausted to evade a Thunderbolt. Magnemite floats back up but is clearly injured. It tries another Thunder Wave, but Pikachu knocks it out with a Quick Attack, giving Ash the first round.
Next up is Steelix; however, it has the advantage with Pikachu fatigued from the last round. Pikachu uses Thunderbolt, but Steelix manages to hang in there. An Iron Tail by Steelix misses it mark. Pikachu retaliates with a Quick Attack, but it has no effect on Steelix's hardened body. Steelix soon finishes Pikachu off with another Iron Tail.
Ash hopes a type advantage will give him the victory, so he calls Cyndaquil onto the battlefield. He tells it to use Flamethrower, but before Cyndaquil's attack hits, Steelix whips up a Sandstorm to defend itself. When the Sandstorm has subsided, Ash realizes that Steelix has used Dig to go underground. Steelix pops out from under and uses Iron Tail, which Cyndaquil easily dodges. After being busy with dodging, Cyndaquil finally uses another Flamethrower on Steelix, but Steelix uses a Sandstorm defense and disappears underground. Steelix emerges soon after and tries to knock Cyndaquil out with several Iron Tails. Ash has Cyndaquil aim a Flamethrower at the wall, and it narrowly dodges an oncoming Iron Tail. Jasmine is impressed by the tactic, so she decides to step things up a notch. Steelix dives underground once again and it emerges in front of Cyndaquil. As Steelix approaches with an Iron Tail, Cyndaquil tries a Smokescreen. Steelix uses Sandstorm to blow the smoke away. However, when Steelix stops for a moment, Cyndaquil isn't there. Cyndaquil soon appears from a hole behind Steelix and shoots out a Flamethrower at an advantage. Steelix gets hit, but it isn't quite down from the blow, getting mad instead. Cyndaquil heads underground again, and Steelix strikes the ground with an Iron Tail. Ash is forced to retire his dive in the hole tactic and orders Cyndaquil to resurface. Cyndaquil tries to dodge an Iron Tail, though it gets smacked out of the ring. Everyone thinks that Cyndaquil is knocked out, but Cyndaquil struggles back onto the field. Cyndaquil collapses and its flames begin to die down. Janina is about to make the final call, but Cyndaquil recovers enough for the round to continue. Steelix dives in for a Crunch attack and Cyndaquil releases another Smokescreen and evades. Cyndaquil tries another Flamethrower, and Steelix spins into its Sandstorm defense. This time, however, Ash has Cyndaquil continue to use Flamethrower at full power. The Sandstorm eventually changes to a brazen red color, and the swirling vortex turns into a deadly and inescapable firestorm. Steelix stops twirling around, and a few anxious moments pass before it finally collapses from the searing heat. Janina officially calls the match and awards Ash the victory. Jasmine is impressed by Ash’s surprise strategy and gives him the Mineral Badge in recognition of his efforts.
Ash wonders where to go next. Brock says they should head to Mahogany Town, and Janina adds that cutting through Ecruteak City would be a shortcut. Brock says farewell to Jasmine, but Misty drags him off before he can flirt with her. By sunset, the group reaches the outskirts of Olivine City and are well on their way towards their next destination, Mahogany Town.