Hidden Palace Zone

Hidden Palace Zone is the fifth Zone in Sonic & Knuckles (and the eleventh of Sonic the Hedgehog 3 & Knuckles). As the shortest Zone in the game, it consists of a single act and functions as a transition between Lava Reef and Sky Sanctuary. It is also the only Zone in any of the Sega Mega Drive-era Sonic the Hedgehog games that is devoted to plot progression. It is based on a deleted Zone from Sonic the Hedgehog 2; although, that is considered a separate location as it would have likely been located on West Side Island (as the 2013 mobile re-release of the game reveals).

Sonic's story
In Sonic's storyline (which can also be played as Tails in the lock-on Sonic the Hedgehog 3 & Knuckles), Sonic arrives in Hidden Palace Zone within the Lava Reef Zone. He encounters Knuckles the Echidna, who still believed Robotnik's claims that Sonic is bad, and there is a boss battle in which the two fight each other. The room of the boss battle is particularly notable for the prophetic mural in the background, presumably created by the defunct Echidna society, which foreshadows the final battle between Doctor Robotnik and Super Sonic in The Doomsday Zone.

After Sonic wins, a cutscene is shown in which Robotnik steals the Master Emerald from the Emerald shrine, thus revealing his true intentions to Knuckles, who, in turn, tries to stop him. Knuckles gets electrocuted, and Robotnik is able to get away without any further resistance. The floor then crumbles beneath the characters, sending them plummeting to a lower level of the palace. When Knuckles recovers, he leads Sonic to a teleporter, which transports them both to Sky Sanctuary Zone. There is no Act clear screen at the end of either version of this Zone.

Knuckles' story
In Knuckles' storyline, the level is much shorter. It contains no enemies or obstacles, and no other objects besides the teleporter used to teleport to Sky Sanctuary, the final Zone in the game for Knuckles (which, again, is much shorter).

The Hidden Palace Zone also appears throughout the second half of Sonic the Hedgehog 3 & Knuckles (after the beginning of the Mushroom Hill Zone), when the player collects one of the Super Emeralds. After entering the first Special Stage after completing the Launch Base Zone, a cutscene is shown in which any collected Chaos Emeralds are transported to the Hidden Palace Zone's Emerald shrine and transformed into Super Emeralds, although they have lost power and are grey. Jumping on a greyed-out Emerald will transport the player to that Emerald's special stage, the completion of which will grant the player a Super Emerald and turn the greyed-out Emerald into its original bright color.

Trivia

 * The player cannot beat Dr. Robotnik while he is stealing the Master Emerald. However, if the player can somehow get to where the trap is without Knuckles, the player character can hit Robotnik as many times as they want. Strangely, when the player hits him 256 times, he poofs into a Flicky; like Robotnik's Badniks. This triggers a glitch, whereas if the player uses Debug Mode and put something in, Dr. Robotnik will be on it.
 * Additionally, If the player defeats Knuckles, while using Tails to keep Sonic in the air, the player can access the cutscene, but if the player jumps into Robotnik, it might take them to a Special Stage, and after the Special Stage, it'll place the player back in Angel Island, with the ground buzzing and and then rising up, and then turning red and the sound of the Flying Battery airship plays and then resets the game back to the Sega Logo.
 * In Archie Comics' Sonic the Hedgehog #139, Sonic, Knuckles and the Chaotix arrive at the Hidden Palace Zone where the Dark Legion are stationed with the echidnas. The mural of Doctor Eggman and Super Sonic is also present. Sonic sees the resemblance and inquires about it, but Lien-Da claims that it has been there for a long time.
 * After the first teleporter, there is a secret area that only Tails (or Sonic with Tails) can reach without using Debug Mode, consisting of two ledges either side of a large gap. This contains 20 rings, invincibility, an extra life, a speed boost and all three kinds of shields.
 * If the player plays as Knuckles, the Death Egg is gone from the background, most likely due to the fact that Sonic's story takes place before Knuckles', thus the Death Egg had already been destroyed at that point in time.
 * In the Sound Test option, it is considered the fourth act of Lava Reef (the Lava Reef boss fight area is coded under "Lava Reef 3").
 * This stage uses the same theme that plays during the second act of the Lava Reef Zone.
 * In the beta versions of Sonic 3, this stage uses Sky Sanctuary's theme.