Lore
Great Flood
The is the name often associated with a deluge that befell the land of Hyrule…
The is the name often associated with a deluge that befell the land of Hyrule many generations after the end of Ocarina of Time in the Adult Timeline. Described in the introduction of The Wind Waker, it occurred when Ganon escaped from his imprisonment in the Sacred Realm and returned to Hyrule, after the departure of the Hero of Time.

Return of Ganon
In the final events of Ocarina of Time, Ganondorf was brutally defeated by the legendary Hero of Time and sealed inside the Sacred Realm, which itself was corrupted by the Gerudo king to become the Evil Realm due to himself touching the Triforce at one point. While Hyrule enters a longtime peace, Princess Zelda permanently sends Link back to his childhood via the Ocarina of Time and Triforce of Wisdom (not knowing she split the timeline into two and Link was sent into the Child Timeline instead). This also caused the hero's Triforce of Courage to shatter apart into eight pieces and scattered throughout the land. However, this decision by the princess, in spite of her good intentions, was not exactly wise, as the Adult Timeline - the game's universe, was ultimately left without a hero.

Many generations after the departure of Link, the powerful seal of the Six Sages began to weaken for an unknown reason, and the evil warlock ultimately managed to escape his imprisonment as his beast form, Ganon. Now free, the villain intended to make good on his furious threat to the Hero of Time and the Seven Sages that he would escape one day to make their descendants pay dearly for his defeat and long imprisonment, due to himself still having the Triforce of Power. As the darkness was quickly covering the land, the people of Hyrule prayed that the Hero of Time would once again come to save them. But the legendary hero did not appear at all, as this particular Link, as well as his allies from his era, no longer exist. Because of this, the villain manages to completely take over Hyrule once again, as he has no opposition whatsoever.
The Divine Deluge
The current King of Hyrule, Daphnes Nohansen Hyrule, attempted to use his magic to stop Ganon, but failed. Left with no other choice, the people, including the king, pleaded to the three Golden Goddesses. The Goddesses eventually answered the kingdom's prayers, instructing those chosen to flee to Hyrule's mountaintops in order to escape the coming flood and to prevent Ganon's wish of the destruction of the land. Once the people were safely away, the Goddesses caused a gigantic torrential downpour, covering the entire land and turning the mountaintops into islands, forming the Great Sea. The king chose to remain behind with his doomed kingdom. He then split the Triforce of Wisdom into two parts and instructed the princess of that era to keep one piece and flee to the mountaintops with her servants.

Ganon's army had already infiltrated Hyrule Castle when the goddesses sealed the kingdom within an enchanted air chamber that prevented the water from destroying it. A magical seal was also cast over the Master Sword and the Pedestal of Time that froze the entire land of Hyrule and Ganon's army, freezing them in time and draining the entire kingdom of color.

The people of Hyrule would then go on to build a new civilization on the surface of the Great Sea and, with the passing of time, largely forget the memory of the old Hyrule that still existed deep beneath the waves. However, the legend of the Hero of Time also still manages to survive.
Aftermath
Many centuries after the initial flood, Ganon, now back in his less powerful Gerudo form, Ganondorf, broke free of the seal binding Hyrule and returned a second time, intending to reunite the Triforce pieces to reconquer the sunken Hyrule. This caused an utterly new incarnation of Link and Princess Zelda to appear to challenge Ganondorf again, as had their predecessors. After eventually uniting the Triforce, and at the will of the old King rather than Ganondorf, the sacred pieces rise into the air and vanish as the air chamber above them begins to collapse, allowing the Great Sea to ultimately pour into Hyrule. After Ganondorf is finally defeated for good, Hyrule is completely swallowed by water, leaving the Hero of the Winds and Princess Zelda (Tetra) to create a new Hyrule above the waves, leading to the events of Phantom Hourglass, and eventually Spirit Tracks with their own descendants.

Sources
Adapted from the original article, under GFDL 1.3.






