Some time later, Rauru the sage ordered the construction of the Temple of Time and the forging of the Blade of Evil's Bane, also known as the Master Sword. This was done so that the resting place of the Triforce, The Temple of Light, which exists in what is often called the Golden Land or Sacred Realm, could only be accessed by breaking a complex magical seal, involving The Temple of Time, The Master Sword, three rocks called "Spiritual Stones," and a heirloom of the royal family, the Ocarina of Time. It was hoped that the Triforce would be sheltered from evil forever. After some time, most regarded the Triforce as a myth, and its only real significance seemed to be its use as the royal family's official seal.
Centuries passed...
Eventually, there was a war, where the races fought each other... the Hylians, Gorons, Zora, and Gerudo. The only race which did not fight was the peaceful ageless Kokiri children, who lived in the forest, and never left. It was in this forest that a mother, fatally wounded, sought refuge for her baby. The Great Deku Tree, father of all Kokiri, sensed that this woman's child had an unimaginable destiny, and would determine the fate of all. The child's name was Link.
The king of the Hylians brought peace to the races of Hyrule, and the war ceased. Eight or nine years went by, and Link was the only child in Kokiri Forest with no guardian fairy. He had friends, but he knew he was different, and didn't know why. Link had begun to have a nightmare every night for months. In his nightmare, he saw a city gate in the rain, where a girl and a woman fled on horseback. As Link watched them go by, he sensed something behind him. He turned around to see a dark man with evil eyes stare down on him from upon his dark horse. One morning, Link a noisy fairy woke Link up from his nightmare. Her name was Navi, and she had come to be his fairy partner.
There was, however, a very grave issue at hand: Navi had been sent to Link by the Great Deku Tree, as he had something to say of utmost importance. The Great Deku Tree explained to Link that he had been attacked by an evil man from the desert. He had been causing havoc in certain areas of Hyrule, demanding the Spiritual Stones. His aim, therefore, was to obtain the Triforce. Since the Great Deku Tree refused to give him the Spiritual Stone of the forest, The Kokiri's Emerald, a curse was cast upon the tree. Knowing that Link had also felt the evil climate of the land, the Great Deku Tree realized now was the time for Link to begin his quest.
Link broke the curse upon the Great Deku Tree, but he was doomed before Link had even begun. The Great Deku Tree gave Link the Kokiri's Emerald, and told him to go in search of the other Spiritual Stones, and the Princess of Destiny.
Link, not being a true Kokiri, was allowed to leave the forest without dying. He made his way to Hyrule Castle, where he met Zelda (one of the Zeldas born after the first had fallen asleep) and her servant Impa. They told him more of the Triforce legend. It was there that Link saw the evil man from his dreams: Ganondorf Dragmire, king of the Gerudo theives. Zelda knew that Ganondorf sought the Triforce, and was trying to swear allegiance to her father so that he may obtain the Ocarina of Time, one of the keys needed to reach the Temple of Light. Zelda and Link plotted to find the Triforce before Ganondorf, so that it would never fall into the hands of evil. Link set out, and obtained the other two Spiritual Stones, the Goron's Ruby, and the Zora Sapphire.
As Link returned to Hyrule Castle, he saw the events of his dream finally occur. In the rain, Zelda and Impa rode away from the city on a white horse. Zelda threw something to Link, but it landed in the moat. Link turned around to be face to face with Ganondorf, who asked him where the white horse had gone. Link refused to say anything, so Ganondorf blasted him with a magic spell and rode on in pursuit of the princess and her servant. Link retrieved the item that Zelda had thrown to him: the royal family's heirloom, the Ocarina of Time! Link took the three Spiritual Stones and the Ocarina of Time to the Temple of Time. There, he broke the seal, and found the Master Sword. Link drew the sword, which was the bridge between Hyrule and the Temple of Light in the Sacred Realm, but the most unexpected thing possible happened...
Ganondorf, suspecting that Link carried the keys to the Sacred Realm, had followed him into the Temple of Time, where he was at last able to enter the Temple of Light. Link, being too young to fulfill his destiny, was instantly sealed inside the Temple of Light in a sleep that lasted seven years. This meant, of course, that Ganondorf obtained the Triforce before Link could.
When Link finally awoke seven years later, he was sixteen years old, at last old enough to fulfill his destiny and banish evil. He was informed of the issue at hand by Rauru, the only sage left in the Temple of Light. Ganondorf had been ruling Hyrule for the past seven years, and his evil so influenced everything, that the temples of Hyrule could not call out to those destined to be sages. Only with the power of all seven sages, could Link fight Ganondorf and banish him from Hyrule. Link set out on this difficult journey, and recovered all of the remaining sages (during this journey, he also discovered that he was really a Hylian). The final sage, who turned out to be Zelda, revealed herself only just before Link entered Ganondorf's Castle. She explained to Link that Ganondorf had been only able to obtain the Triforce of Power, due to the imbalance in his heart. The essences of remaining two pieces of the Triforce would then have been found within the two people most worthy of them. Zelda then revealed that the ones holding those essences were herself, with wisdom, and Link, with courage!
Ganondorf, however, captured Zelda, and Link was forced to go to his castle to rescue her. This was was Ganondorf had hoped would happen: he would then draw the essences out of Zelda and Link, so that he could hold all three parts of the Triforce, which would then mean that he would be the true ruler of all. When Link reached Ganondorf at the top of his castle, a fierce battle took place, and Ganondorf fell. With his last breath, he caused his castle to collapse, and Link and Zelda barely escaped. Then, when they thought it was all over, Ganondorf emerged from the rubble, and used the last of his Triforce power to turn him into the most hideous of beasts, which directly reflected his heart: Ganon. Link fought Ganon and after delivering a hard blow to his head with the Master Sword, Zelda and the other sages were able to banish him into the Sacred Realm, from where he should have had no escape. As he fell into his prison, Ganon vowed to destroy the decendants of Link and the sages...
At long last, the seven-year long "Imprisioning War" was over. Zelda used the Ocarina of Time to return Link to his original time, so that he could recover his lost years in a Hyrule where Ganondorf would not reign for seven years, as he would have done, if he could not have been banished into the Sacred Realm. Navi left Link, and all seemed well... for the time being. Ganon would be all but forgotten, but he was not dead yet.