Agahnim

Agahnim, also known as the Dark Wizard, is an evil wizard who serves as the antagonist of the videogame The Legend of Zelda: A Link to the Past. Although he is believed to be a servant of Ganon, he is in reality the demon king's avatar, created and sent to Hyrule in order to break the seal on his stronger counterpart.

Biography
This biography of Ganon's alter-ego Agahnim is organized into the latest "official Zelda timeline", this may change completely in the future as the timeline given is merely meant as an example, and their have been official timelines before it.

Downfall Timeline
This is the timeline where Ganondorf killed Link in his final battle with him, leading to the Imprisoning War described in A Link to the Past 's backstory.

Pre-A Link to the Past

 * See: Ganondorf

A Link to the Past
While trapped in the Dark World, Ganon created a copy of himself with several of his abilities - the Ganondorf copy was then sent to Hyrule under the alias of "Agahnim".

The land of Hyrule became besieged by an onslaught of terrible misfortunes, like pestilence and drought, the King of Hyrule offered a reward to a person who could put an end to these problems. A mysterious man named Agahnim came and put an end to the troubles with a previously unknown magic. He was declared a hero and was given the 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, make the King of Hyrule disappear, and capture six of the descendants of the Seven Sages to make them disappear to the Dark World.

After Link rescued her, Zelda hides in the Sanctuary. She was the last of the descendants, so Agahnim would probably come after her as well. Eventually, Agahnim's troops find her and take her to the top of the highest tower of Hyrule Castle. Agahnim then sends Princess Zelda to the Dark World, this breaking the seal of the Seven Sages. He tells Link that nothing can stop him now, because the Tribe of Evil can now use the Triforce, and that evil and darkness will soon overrun the Light World. He then vanishes, but Link manages to find him in an hidden chamber where he duels the Dark Wizard. Before Link can defeat the wizard, he flees into the Dark World. During Link's quest to rescue the seven maidens, Link learns that Agahnim is a servant of Ganon.

While in the Dark World, Agahnim returns to Ganon and he possess Agahnim's body - deciding to put his copy to use it to defeat Link instead of just getting rid of it.

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

Oracle of Seasons
Though Ganon was destroyed, he was somehow able to recreate Agahnim before he destruction. Agahnim (now going by the name of Agunima) went to Holdrum with Onox in order to assisst him in reviving his true self. He guarded the Dancing Dragon Dungeon but was defeated by Link, despite this Ganon was still revived later in the game.

Child and Adult Timeline
Agahnim is never created by Ganon in these timelines, instead, a copy of Ganondorf named Phantom Ganon appears.

Strategy
Link can't hurt Agahnim directly, not even with the Master Sword. Link must use his own magic attacks against him. When attacking, Agahnim hurls magic attacks at Link. The first one is a magic ball, which can be hit with the Master Sword to reflect it, and make it wound Agahnim. the second attack can also be hit with the Master Sword, but it splits up in multiple fireballs flying through the room. The third attack 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 directly, he receives a electical shock.

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 create magic balls that can be bounced back.

Trivia

 * Several traits of Agahnim, including his signature theme and his infilitration of the Hylian Royal Family, would be incorporated into Ganondorf's character in Ocarina of Time.
 * Although he is an extension of Ganon, all comic adaptations of A Link to the Past present Agahnim as an independent character.
 * In the first battle against Agahnim, Link must play dead man's volley with the boss as he can't attack Agahnim directly. This becomes a recurring battle strategy throughout the series, particularly with another one of Ganon's copies, Phantom Ganon.