Marge's memory lighter tells Ruby that his father has spent the past five years searching for Rayquaza as per the order of the Pokémon Association. In fact, Rayquaza has the power to subdue Kyogre and Groudon, so between Rayquaza and the Jewels Ruby holds, they should be able to end the battle.
Ruby jumps onto Rayquaza with Norman. As they attack Kyogre and Groudon, Rayquaza and the Jewels light up, a blast of energy separating Kyogre and Groudon. Kyogre and Groudon turn away and leave.
From underneath a pile of rocks, two beings stir.