The Coming of the Wizard
Ganon had been imprisoned for generations. Trapped in the Sacred Realm, now referred to as the Dark World, Ganon's vile power had slowly polluted everything around him, warping all living things and scarring the earth. He wished for only one thing - to escape his tomb and have his revenge on those who had imprisoned him. Over the years, Ganon had come to understand his power more and more, and began to formulate a plan for his escape. He discovered that he could communicate with certain individuals in the Light World, the title that the denizens of the Dark World had given Hyrule. Ganon was able to contact a wizard by the name of Agahnim, and possess him with his evil power. And so the plotting began.
Over the last several generations, Hyrule had been a prosperous nation. Hyrule Castle had been rebuilt at the foot of Death Mountain, and the Lost Woods expanded to cover the ruins of the old castle and town. The Temple of Time, no longer connected to the Dark World, slowly collapsed until all that remained was the pedestal that housed the Master Sword. The Gorons and Zoras had since left the kingdom for unknown reasons, leaving behind only violent relatives in the high mountains and rivers. The Hylians had become the dominant race in Hyrule.
With the current levels of prosperity, no one expected the events that were about to take place. Droughts, famine, the likes of which Hyrule had never seen. When no solution could be found, even by use of various magics, the king of Hyrule grew suspicious. He ordered an investigation of the seal on the Dark World, but it was still intact. Baffled, the situation seemed hopeless. But then a mysterious magician stepped in and stopped the disasters that were taking place with an unknown form of magic. The wizard Agahnim was hailed as a hero by the people of Hyrule, and was given a position of prestige close to the King. Little did the people know that Agahnim himself was behind the disasters, using new powers granted to him by Ganon.
With his new position of power, Agahnim installed a puppet regime. He disposed of the king, and used the resources now at his command to capture maidens from across the land, all descendants of the sages that originally imprisoned Ganon in the Sacred Realm. His plan was to send the maidens, one by one, into the Dark World - thus weakening the seal placed by their descendants. Soon enough only one maiden remained - the Princess Zelda. Captured, but not yet transferred to the Dark World, Zelda sent out a telepathic plea for help. On the receiving end was Link, descendant of the legendary hero of the Imprisoning War. Before he could do anything, though, his uncle took up a sword and shield, told Link not to leave the house, and set off for Hyrule Castle. Not so easily swayed, Link took a lantern and followed his uncle. Entering the caverns beneath the castle through a secret passageway, Link found his uncle gravely wounded. He had responded to Zelda's call so Link wouldn't have to, but he now understood that Link was the only one who could make it through the castle to rescue her. He gave Link his sword and shield, and sent him on his way.
Link, though still inexperienced, fought his way through the castle until he found the Princess Zelda caged in the basement. He freed her and led her out through the Castle's secret escape tunnel, which ended at the Sanctuary, a safe place near the graveyard. After thanking him for his assistance, Zelda and the sage that lived in the Sanctuary urged Link to confront Aghanim and rescue the maidens. For this he would need the Master Sword - the legendary sword of evil's bane.
The Quest for the Master Sword
Link's first goal was to find the wise man Sahasrahla. A direct descendent of the seven sages who sealed away Ganon, Sahasrahla had great knowledge of Hylian lore. He informed Link that in order to obtain the Master Sword, he would have to earn three pendants, derived from the fabled Spiritual Stones. He led Link to the East Palace, where he found the Pendant of Courage. After obtaining the Book of Mudora from the library in Kakiriko Village, Link could translate the text in front of the Desert Palace, which he used to discover a hidden entrance. The Pendant of Power rested at the end of the palace, ripe for the taking.
With the maidens in captivity, the seal on the Dark World had grown very weak. Ganon still couldn't escape, but small rips in the barrier were starting to appear. Inadvertently, many Hyrulians ended up wandering into the Dark World through these portals, unable to return. The power of the Dark World would alter them physically, turning them into animals, monsters, or just plain old blobs. In order to enter the Dark World in search of Ganon, Link would have to find the Moon Pearl - a sacred artifact that would allow him to maintain his original form. Within the Tower of Hera on Death Mountain, Link found both the Moon Pearl and the Pendant of Wisdom. He was now free to claim the Master Sword.
But it wouldn't be easy. Upon entering the Lost Woods, Link found himself in a maze of thievery and illusion. Bandits had made the Lost Woods their home, and preyed upon anyone foolish enough to enter. After evading his pursuers and making his way past many illusionary Master Swords, he finally found himself in front of the legendary pedestal. After pulling the sacred blade, he was finally ready to face Aghanim. Link made his way towards the castle, and confronted Aghanim at its summit. In a mighty battle, Link succeeded in besting the evil wizard. However, Aghanim had managed to draw Link into the Dark World. Link found himself in a bizarre and nightmarish world, ruled over by the one and only Ganon.
Conquest of the Dark World
Contacted telepathically by Sahasrahla, Link learned that the captured maidens were all imprisoned in temples scattered throughout the land. If Link hoped to keep the Dark World from overflowing into the Light World, he would have to rescue and free all of the maidens. Link's quest was a difficult one, and he faced many enemies and fearsome monsters. Only by traveling back and forth between the Light and Dark Worlds could Link successfully enter the dungeons where the maidens were imprisoned. As he freed them, they told him of his relation to the mighty Knights of Hyrule, and of his heroic destiny.
Finally, the maidens had all been freed. The last was the Princess Zelda, who had been captured earlier by Ganon's forces. She bid Link good luck, and directed him towards Ganon's Tower. After fighting his way to the last chamber, Link again faced off against Aghanim. Again no match for Link's mighty blade, Aghanim crumpled and revealed his true nature as the spirit of Ganon. Ganon fled to the Pyramid of Power, which was the new name for the corrupted Temple of Light that housed the Triforce. Before engaging Ganon, Link found the mighty silver arrows, the only weapon powerful enough to pierce Ganon's hide. Link scaled the Pyramid of Power, and in a climactic battle managed to slay the evil king once and for all.
With Ganon destroyed, Link searched through the Pyramid of Power and found the room that housed the Triforce. The Triforce spoke to Link, telling him of Ganon's evil wishes. But now that Ganon was destroyed, the Triforce was free to grant Link's wish. With the good in his heart, Link used the Triforce to heal the Dark World, returning it to the magnificent Sacred Realm. He returned to Hyrule triumphantly, and delivered the Triforce to the royal family. It was installed deep within Hyrule Castle, never to be exploited again.
Chapter 4 Notes
Facts for Chapter 4 were taken from Link to the Past.
One of the nice things about Link to the Past is that its story was fairly straightforward. There are a few things to talk about, but nothing all that major.
First off, the maidens are clearly all Hylian, even though the sages that they descend from belonged to various races. One explanation could be that when the other races left Hyrule, new Hylian sages were appointed to take their place. But I prefer to chalk it up to Nintendo just wanting to make the storyline more interesting when they made OOT, and not wanting to redo any of the sprites when they re-released LTTP.
More worthy of talking about is the return of the Triforce to the royal family. Nowhere in LTTP does it mention Link bringing the Triforce back with him from the Dark World, but it's implied by the games that take place later in the timeline. The Triforce is deep within Hyrule Castle, at least in part, in both of the Oracle games, the Legend of Zelda, and the Adventure of Link. So it stands to reason that Link brought it back with him, used it to heal the land and revive the king, and then left it to the royal family from then on.