This fight is tricky at first glance, but it can be a relatively easy finale for a seasoned player. Rings fly aimlessly around the Zone and can be used to refill the player's Ring count, which needs to be kept with at least one Ring in order to keep the player's Super State: if the player's Ring count hits zero, the fight will end, and the player will lose a life.
In this fight, the player must fight two bosses, each with different attack patterns:
Phantom King: The key to defeating the Phantom King is patience. When entering the boss arena, the Phantom King will chase the playable character around while surrounding himself with an impenetrable barrier of spheres that can knock the player back on contact. He soon after starts to fire these spheres, one after another, at the playable character, which can make the player lose ten Rings if they hit. Once the Phantom King has fired all of his energy orbs, he will generate more to shoot. To move in for a hit, the player must either find an opening or wait until the Phantom King no longer has a shield to strike with.
Klepto Mobile: After entering the boss arena, the Klepto Mobile will chase after the playable character. Should the player get near the vehicle, it will attack with rapid punches that can repel the player without damaging him. In order to land a hit on the Klepto Mobile, the player must wait until it stops swinging its arms and then move in to damage it. If the player keeps their distance from Klepto Mobile however, it will harness the Phantom Ruby's power to encase itself in a strange barrier, then charge into the player, knocking him away; however this attack will not make him lose any Rings either. Also, after being hit seven times by the player, the Klepto Mobile will fly across the Zone while using the Phantom Ruby to blast a powerful beam towards the player.
During the battle, the bosses will take turns battling the player, with the Phantom King starting out first, making the fight easier to manage. Whenever the player lands a hit on a boss (or if enough time passes without the player making a move), it will drop the Phantom Ruby and fly off-screen, leaving the other boss to enter the battle with the Phantom Ruby in their possession.
Both bosses take eight hits each to defeat. Typically, the Phantom King is always defeated first, with Eggman defeated afterwards. However, it is not impossible to defeat Eggman first.
Whilst normally, this boss can only be accessed by Sonic, it can also be accessed by Knuckles when "& Knuckles" mode is activated. The ending shows a still image of Knuckles reading a book called "Sonic Mania & Knuckles" to a group of excited animals, as Sonic and Tails look in confusion. This special ending plays a track heard nowhere else in the game; a remixed version of the title screen music from Knuckles' Chaotix. This ending can also be seen, replacing the normal ending, if Knuckles defeats the Phantom Egg.