|Occurrence(s)||The Demon King Malladus attacks Hyrule|
|Resolution(s)||The good spirits imprison Malladus deep underground using shackles and a lock.|
The Spirit War is a conflict described in the back-story of Spirit Tracks that resulted in the creation of the railroad system that covers Hyrule during the events of the game. The story of the Spirit War is first spoken of by the aged Niko, one of the few surviving original settlers of the reborn kingdom of Hyrule, who opens the game with this story.
After a period of relative peace for the first settlers of the land, the Demon King Malladus rose to power and began to cause much devastation, forcing the good spirits of the land to engage him in a prolonged war. Exhausting all of their energies and even using the Bow of Light in an attempt to drive away the Demon King, the good spirits, unable to truly kill him, buried him deep in an underground prison and sealed it with a set of shackles, the Spirit Tracks, and a lock, the Tower of Spirits. The good spirits, their power spent, returned to the heavens, giving the land over to the settlers.
The Hyrulean monarchy was then re-established to govern the land, which was officially named as the reborn kingdom of Hyrule. Tetra, the then-current incarnation of Princess Zelda, was elevated to her destined status as ruler of the kingdom (even later appearing in the central stained glass window of Hyrule Castle) and took the reins of the kingdom. The wise Lokomo who guarded the Tower of Spirits, Anjean, established a close friendship with the feisty young royal and entrusted to her a sacred treasure: the Spirit Flute. Tetra promised Anjean that she and her descendants would use the Spirit Flute to protect the land henceforth, and the two carried on their friendship to the end of the former's days. Thus, the kingdom of Hyrule that had been drowned beneath the Great Sea was restored in the land of spirits, fulfilling the wish of the deceased Daphnes Nohansen Hyrule that the Hero of Winds and Tetra would be the seeds of Hyrule's future by re-establishing it in a new land.
- A resident of Hyrule Castle Town makes the statement that people have asserted that the Spirit Tracks had been around even before the settling of the land. This means that the war happened long before Tetra and Link came to the land. This is confirmed within Encyclopedia.
- "This is a tale from long ago. It's the tale of the first settlers of this land." — Introduction (Spirit Tracks)
- "In the beginning, the people followed the spirits of good, and all was peaceful." — Introduction (Spirit Tracks)
- "But that era of peace soon came to an end. The evil Demon King rose to power, destroying everything in his path." — Introduction (Spirit Tracks)
- "The spirits of good had no choice but to face him in battle. The war that ensued seemed to last an eternity, and much blood was shed." — Introduction (Spirit Tracks)
- "In the battle between the Demon King and the spirits, there was a weapon called the Bow of Light... Perhaps it can drive his spirit from your body." — Anjean (Spirit Tracks)
- "Finally, the spirits subdued the Demon King, though they could not destroy him. Their powers were greatly depleted. With their remaining power, they buried the Demon King's spirit in the ground. They built shackles to imprison him, and a tower that acted as a lock. These shackles cover the land to this day." — Introduction (Spirit Tracks)
- "With their power drained, the spirits of good returned to the heavens. Suddenly bereft of both demons and spirits, this land was entrusted to us." — Introduction (Spirit Tracks)
- "By the way, do you know anything about these tracks? People say they've been around since before we came here. But how could that be?" — Hyrule Castle Town Resident (Spirit Tracks)