Agahnim

Agahnim (Pronounced, ) is the dark wizard who serves as one of the primary villains of A Link to the Past. He also appears as a mini-boss in Oracle of Seasons.

A Link to the Past
When Hyrule became besieged by an onslaught of terrible misfortunes (pestilence, drought, etc.), the King of Hyrule offered a reward to anyone who could put an end to these disasters. A mysterious stranger named Agahnim came and put an end to these troubles with a previously unknown magic. He was declared a hero and given the prestigious positions of chief advisor to the King, priest, and heir to the Seven Sages. Agahnim used this position and his mysterious magic to brainwash all of Hyrule's soldiers, depose the King of Hyrule, and make six of the Maidens, descendant of the Seven Sages, disappear to the Dark World.

After being rescued by Link, Zelda, the last of the descendants, hides in the Sanctuary until Agahnim's troops find her and take her to the tower at the top of Hyrule Castle. There, Agahnim sends her to the Dark World, thus breaking the Seal of the Seven Sages. He gloats that nothing can stop him now, because the Tribe of Evil is armed with the Triforce, and that evil and darkness will soon overrun the Light World. With this, he seemingly vanishes, but Link is able to discover his whereabouts by slicing open a curtain and revealing a hidden chamber where he duels the Dark Wizard, turning his own magic against him. But before Link can soundly defeat him, Agahnim draws him into the Dark World. During his quest to rescue the Seven Maidens, Link learns that Agahnim is a servant, or perhaps a pawn, of Ganon.

When Link defeats Agahnim a second time at the top of Ganon's Tower in the Dark World, he collapses, and from his body a faint image of Ganon appears. The image turns into a bat and flees to the Pyramid of Power. At the start of the final battle, Ganon reveals that Agahnim was his alter ego.

Strategy
Even with the Master Sword, Link is unable to harm Agahnim directly, and must use the sword to turn his own magic against him.

When attacking, Agahnim hurls magical attacks against Link. The first of them, a magic ball, can be hit with the Master Sword to reflect it, so that it hits Agahnim himself and wounds him. The second one can also be hit with the sword, but it splits up and flings fireballs throughout the room. The third one is a lightning attack which Link can only avoid by standing at Agahnim's side. The lightning strike cannot be reflected. If Link strikes at Agahnim's body with the Master Sword, he receives a violent electrical shock in consequence.

While he fights alone in Hyrule Castle, in Ganon's Tower he creates clones of himself to confuse Link. This can actually work to Link's advantage, as the clones only produce magic balls that can be bounced back with the sword.

Oracle of Seasons
In Oracle of Seasons, a wizard resembling Agahnim makes a cameo in the fourth dungeon, Dancing Dragon Dungeon, as a mini-boss. He splits himself in three parts, and Link must guess which one is real. To find out which one is real, Link must first light up the two torches in the room. The real wizard has a shadow, while the other two do not. Link can simply hurt him by slashing him with the Wooden Sword.

Identity
Agahnim's relationship with Ganon is occasionally debated. While some believe that Agahnim is just a wizard who Ganon corrupted and used to do his work in the Light World (Hyrule), many others maintain that Agahnim is merely a disguise used by Ganon. This theory is strongly supported by the fact that Ganon appears from within Agahnim's body, and that in the final battle Ganon refers to Agahnim as his "alter-ego". In the Japanese version of A Link to the Past, Ganon refers to Agahnim as his "ぶんしん," or bunshin, the same word used to describe the clone attacks of Meg the Poe in Ocarina of Time. This may indicate that Ganon used magic to escape the seal by splitting himself in two and disguising his weaker alter ego as Agahnim.

Other Appearances
Agahnim also makes a cameo appearance in Link's Awakening, appearing as one of the forms of the final Nightmare in the Wind Fish's Egg. Here he can be defeated the same way as in the previous game, with the reflections of the magic balls.

A Link to the Past comic
Agahnim appears in the comic book adaptation of A Link to the Past. Like most adaptations of the game, Agahnim is a separate entity from Ganon, rather than his alter ego.

Agahnim first makes an appearance when Link witnesses his uncle being defeated at the hands of the wizard. After the young hero rescues Princess Zelda and takes her to the Sanctuary, Agahnim easily takes her back again to the top floor of Hyrule Castle where, on a full moon, he will cast the final incantation on the princess to open the way to the Dark World and release Ganon.

After Link obtains the Master Sword, Agahnim's preparations to cast the final incantation are complete, but he is soon interrupted by Ganon. He warns the wizard that a "being with intense emotional energy" is approaching the castle, much to Agahnim's surprise. Knowing this, Agahnim decides to wait on casting the incantation  until   Link arrives so that he can send Zelda into the Dark World  right  in   front of Link. Just then, Link lands on the castle's highest tower and rushes to find  Agahnim in the middle of his spell. Although Link tries to harm the  wizard with the Master Sword, the weapon passes right through  Agahnim, which causes him to turn around and paralyze Link by only looking at him. Agahnim then casts Zelda into the Dark World, triumphantly mocking Link that not even the legendary hero could stop them from obtaining the Triforce.

As Agahnim continues to ridicule Link,  the Master Sword begins to shine while Link is still frozen. Link's   rage towards Agahnim begins to channel through the Master Sword, which   causes  for the  castle to begin to crumble down. Agahnim and Link begin to battle, and Link uses the sword to turn back  Agahnim's magic against him and successfully defeat him. Bested by Link, Agahnim reveals that him being killed will not  restore   the Wise Men's seal, and with his final breath transports  Link  to the Dark World as Hyrule Castle crumbles to reveal the Pyramid of Power.

Towards the end of the comic, when Link, Princess Zelda, and Roam reach Ganon's Tower,  an illusion of Agahnim approaches Zelda. Although Roam successfully  interferes and saves the princess's life, he is killed by Agahnim, and   Ganon himself soon rises from the defeated illusion.

Manga
In the Triforce of the Gods manga by Akira Himekawa, Agahnim is given a backstory as a friend to Link's Father. He studied to become a magician while his friend trained to become a Knight of Hyrule. When Link's father told him the story of the Imprisoning War and the Triforce, Agahnim became intrigued and researched for ways to break the ancient seal. When Link's father confronted him about his investigations, he used his magic to trap Link's parents in the Dark World. He then struck a bargain with Ganon: he would undo the seal of the Sages and Ganon would grant him powerful magic.

Agahnim also exhibits some attraction to Princess Zelda, as he tells her just as he is about to send her into the Dark World.

Agahnim also appears in the earlier Triforce of the Gods manga by Ataru Cagiva. His portrayal is similar to that of the game, but the manga shows him doing good deeds with his magic so that the  people will not suspect his treachery.

Trivia

 * The Magician from The Adventure of Link shares many similarities to Agahnim: both were close to the Royal Family of Hyrule but tricked them in order to serve Ganon. The Magician may have served as a prototype or concept for Agahnim.
 * The battle against Agahnim is one of the first examples of Tennis in the series.
 * Strangely enough, Agahnim's fireballs can be reflected back at him by hitting them with the Bug Catching Net. This is referenced in later games by the fact that the player can reflect Ganon's attacks by swinging an Empty Bottle.
 * The Blue Stalfos mini-boss of Ancient Tomb attacks in a quite similar manner to Agahnim, except that he cannot create lightning, but instead turns Link into a baby.
 * The Eye Symbol that Agahnim has on the front of his robes in the official artwork, as well as a design throughout Hyrule Castle when on the way to confront him, strongly resembles the symbol of the Sheikah.
 * His in-game sprite strongly resembles Ganondorf's Gerudo form dressed in green robes. Agahnim and Ganon also share the same theme music; this music later became Ganondorf's leitmotif in future games. The word used to describe Agahnim in Japanese, bunshin (ぶんしん) loosely translates to "split soul".
 * Like Agahnim, Zant appears to be the primary antagonist of the game Twilight Princess until the plot takes an unexpected turn, revealing Ganon to be the Final Boss.
 * In the official artwork, Agahnim is depicted with red robes, whereas in-game they are green.