AG178

Battling the Enemy Within! (Japanese: バトルピラミッド！VSレジロック！！ Battle Pyramid! VS Regirock!!) is the 178th episode of the, and the 452nd episode of the Pokémon anime. It first aired in Japan on May 25, 2006 and in the United States on December 6, 2006.

Blurb
Ash is really excited to get to the Battle Pyramid, but he falls down a hole into a strange ruin. When Team Rocket goes to check it out, they end up falling in as well. As Ash and his friends explore, they set off a trap! They're saved by a man and his Regirock—the man's name is Brandon, and he tells Ash off for messing with the ruins. The ruins, he explains, are where the King of Pokelantis sealed a Ho-Oh. But instead of being careful, Ash gets excited and runs off in search of Ho-Oh. He finds something much more sinister when he awakens the spirit of the King, who possesses him and demands everyone's Pokémon as part of plan to rule the world!

Brandon challenges Ash, Pyramid King to evil King, at the Battle Pyramid. Only one Pokémon is allowed, and the King gets Brandon's Pokémon if he wins. The King takes advantage of Ash's battling knowledge, but Brandon's Regirock is no pushover. But the King has one more trick—he has no scruples! He has Sceptile collapse the ceiling on Regirock. Brandon calls it cowardly, and that snaps Ash back for a minute. Regirock comes back out, but the King has Sceptile hide behind the referee so Brandon won't attack.

Regirock uses Lock On to make sure its Hyper Beam hits, knocking Sceptile out. Then the King demands that Pikachu battle even though he's lost. Ash's friends call for him to return, and Ash regains control long enough to tell Pikachu to use Thunderbolt on him, expelling the King's spirit. This lets Brandon trap the King back in the stone sphere. Everyone's relieved, but Brandon reminds Ash that his foolish overconfidence led to this disaster—and now he'll have to wait for an official battle.

Plot
and finally see the Battle Pyramid, and Ash is confident that he will win. However, they fall into a hole and plummet into an ancient ruin whose walls are covered in ancient hieroglyphs and pictures of people and Pokémon. Max spots a light source ahead, and Ash heads for it. Meanwhile, finds the pit Ash and the others fell through. The ground is unstable, and Team Rocket widens the pit, falling in as well.

Ash finds a statue and grabs it, even though Max tries to convince him not to, causing the pillar it was resting on the rise and the statue's eyes to glow blue. A nearby wall with an identical depiction of a Pikachu flashes its eyes as well and begins to rise. A giant, spherical boulder begins to pursue the group. They run into an explorer who calls them foolish kids. He summons a to destroy the boulder with.

Ash then says, "Gee thanks, mister! You saved our lives!" The explorer responds with a "Noooo!". The man then identifies himself as. Brandon talks about the ruins, called Pokélantis, an ancient kingdom whose king tried to control as part of his plan to rule the world. Ho-Oh destroyed the entire kingdom for the King's wicked attempt. Team Rocket overhears and misinterprets that Ho-Oh is in the ruins, so they set off to find it.

Ash is excited that he might run into Ho-Oh, but Brandon doesn't want them to follow. Ash reveals that he won six Symbols and runs off. Brandon and the others pursue Ash. Meanwhile, Team Rocket find a statue and set off a boulder trap similar to the one Ash set off.

Ash runs into the door leading into the King's chamber, which quickly opens, letting him inside, and shuts immediately thereafter. and Max push against the door, but it does not budge. Brandon tries to find the mechanism that opens the King's chamber. Inside the King's chamber, all of the torches light automatically as Ash stands up. He finds the King's throne under an enormous monument of the King himself and a stone orb shaped like a resting on the seat. Thinking Ho-Oh is inside, he grabs the orb and holds it above his head, commanding it to emerge. Brandon gets the door open and they get inside. Brandon tries to get Ash to set the orb down, but the mysterious object suddenly activates. The orb levitates in the air as a dark voice chants a spell, enveloping Ash in dark energy. He falls to his knees, still surrounded by a blue and black aura. The others stare in shock as Ash gets back on his feet and laughs with a deep, sinister voice.

Team Rocket encounter a door, and volunteers to look through the keyhole, where he sees a bird's silhouette. Thinking they have found Ho-Oh, Team Rocket open the large doors, only to be chased away by an angry pecking at their bottoms.

Back in the King's chamber, Ash commands everyone else to give him their Pokémon. The dark energy around him reaches out and grabs May's Poké Balls, but she and Max take them back. Ash declares himself to be the King of Pokélantis, and Brandon reveals that Ash is being possessed by the King's spirit. Brandon confronts the King, mentioning his failure to imprison Ho-Oh, and challenges him to a battle. Brandon announces that he is the king of the Battle Pyramid, and if the King wins, he can have all of Brandon's Pokémon. The King accepts.

Team Rocket hear a roar at the mouth of a tunnel and run down it, thinking it is Ho-Oh. Instead, a furious greets them with, sending them running. Meanwhile, Brandon takes the King and the others to the pyramid, where Scott is waiting. The King pushes Scott aside as he walks into the Battle Pyramid, declaring that no one stands in his way. Inside, Scott finds out that Ash is possessed by the King's spirit. Afterwards, he reveals that Brandon explores ruins as well as being a Frontier Brain.

The battle is set for a one-on-one match. Brandon sends out Regirock. Ash wakes up inside another dimension but can see through the King's eyes. Noticing the battle, Ash summons, which the King replicates in reality. Ash orders Sceptile to use, which the King replicates. Regirock uses to nullify the attack. The King then orders, but Iron Defense also nullifies it. With a snide grin, the King orders Sceptile to fire Bullet Seed at the ceiling. Sceptile is hesitant at first, but obeys. The attack causes rubble to crash on top of and bury Regirock. The group notes that Ash would never attack in that manner. Brandon calls the King a coward for his tactic, but Ash hears the insult from within the King. Ash temporarily breaks the spell, denies that he is a coward, but soon loses control to the King.

Max thinks Regirock is down and out, but the Rock Peak Pokémon breaks out of its tomb and immediately uses. In an astonishing move, the King orders Sceptile to use the referee as cover. Sceptile initially hesitates, not used to Ash using such dirty tricks. The King tells him to obey, so Sceptile leaps behind the frightened referee, Samuel, forcing Brandon to cancel the attack. The King uses Sceptile's Leaf Blade on Regirock's leg, causing it to kneel down. Regirock uses, targeting Sceptile. The King orders another Leaf Blade on the other leg, rendering Regirock immobile. Regirock uses Hyper Beam again. Sceptile's attempt to dodge fails as Lock-On ensures that the attack hits. Hyper Beam comes around and Sceptile is blasted to the ground and faints. The King refuses to admit defeat and orders Pikachu to battle. May, Brock, and Max defend Pikachu and try to break through to Ash. The King appears resistant and orders Pikachu to use Thunderbolt, but it refuses. Brandon reminds Ash that they're his good friends, and Ash gets to use  on him. The attack frees Ash from captivity and purges the King from his body. Brandon uses a counter of the spell to banish the King's spirit back to the orb. Ash returns to normal, much to his friends' relief. Brandon admits to Scott that Ash's friends freed him from the spell.

Meanwhile, Team Rocket are still in the ruins. They find a hidden room between two sliding walls that houses a mere. Jessie throws a rock, angering Hoothoot and prompting it to attack Team Rocket's bottoms as they flee. They unknowingly activate a spring tile that sends them flying out of the ruins.

As the sun sets, Brandon tells Ash that his own carelessness and arrogance attracted the King and rendered him vulnerable. Ash admits that he may be a foolish kid at times, but he still wants the chance to battle Brandon fair and square. Unfortunately, Brandon declines the challenge as he has some more ruins to visit, but he tells Ash he will get in touch when the time is right. He advises Ash to train hard in the meantime. Brandon and Samuel enter the Battle Pyramid, and Scott advises the group to stand back. The Pyramid's corners slide outward and dust begins to be kicked up. The massive structure lifts into the sky on rotors that keep it aloft, allowing Brandon to move to the his next ruins site. May notices a golden bird in the sky, and the whole group witnesses the real Ho-Oh flying in the distance. Ash remembers how he saw it when he first started out on his journey. He uses this to inspire himself to train for the official battle. But for now, the Grand Festival is on the horizon, and May cannot wait to put herself to the ultimate test.

Major events

 * and arrive at the Battle Pyramid and meet Pyramid King Brandon, the seventh and final Frontier Brain.
 * Ash is possessed by the evil spirit of the King of Pokélantis, which comes from a stone sphere sealed in the Ancient Ruins.
 * Brandon agrees to the King of Pokélantis in order to save Ash.
 * Ash's Sceptile faces in an unofficial battle and loses.
 * Brandon promises Ash an official battle, but it will not be for some time because he has business elsewhere.
 * Ash sees for the third time, while, , and Max see Ho-Oh for the first time.

Humans

 * Samuel
 * Samuel

Humans

 * Max
 * Jessie
 * James
 * Scott
 * King of Pokélantis (flashback/spirit form)
 * Samuel
 * Scott
 * King of Pokélantis (flashback/spirit form)
 * Samuel
 * Samuel

Trivia

 * Pokémon Symphonic Medley is used as background music.
 * The "giant boulder rolling down a narrow corridor" scene from the movie  is reenacted twice in this episode, with Pikachu and Smoochum statues in place of the fertility idol.
 * A similar scene would occur in Explorers of the Hero's Ruin!, while a group of people being chased by a boulder would later also be parodied in Dummy, You Shrunk the Kids!.
 * doesn't recite their in this episode.
 * The ongoing Japanese pun in this episode was to have Pokémon appear to Team Rocket that have similar names to '. These Pokémon included ', ', and '. This joke could not be translated into the dubs since most of these Pokémon have names that sound nothing like 's name in each language.
 * One of the doors in the ruins appears similar to the wall where the four treasures were placed in A Ruin with a View.
 * This is the first time that and  are not alone when they see.
 * This also marks the final time that Ash and Pikachu see Ho-Oh to date.
 * An arrangement of 's music can be heard at the end of the episode.
 * The opening theme is used as background music for the next episode preview.
 * narrates the preview for the next episode.
 * This is the first time Ash is possessed by an evil entity. He was possessed again in Hoopa and the Clash of Ages.
 * This is the first episode to feature a Legendary Pokémon.
 * The English dub title would go on to be reused with Battling the Beast Within!.

In other languages
Der Feind in mir EP455 AG178 AG編第178話 精灵宝可梦 超世代 第177集