Agahnim

"Oh, so?... You mean to say you would like to be totally destroyed? Well, I can make your wish come true!"

- Agahnim

Agahnim is the main antagonist for the first part of The Legend of Zelda: A Link to the Past. He is an evil sorcerer who plans to open a gate between Hyrule and the Dark World by using the seven maidens. He is a piece of Ganon's soul acting on his wishes.

The Legend of Zelda: A Link to the Past
Prior to the start of The Legend of Zelda: A Link to the Past, Hyrule was in chaos due to several plagues and disasters ravaging it. The mysterious wizard Agahnim appeared and made all the problems vanish with his magic; it is therefore implied that they were actually curses of his own doing. The King of Hyrule gives him the position as adviser as a reward, which Agahnim uses to kill the King and brainwash the soldiers of Hyrule Castle. He begins to capture the seven maidens, who are descended from the seven wise men of ancient times who sealed Ganon into the Sacred Realm, and begins transporting each into the Dark World (the corrupted remains of the Sacred Realm) in order to open a stable path between them for Ganon to escape from. The last of the maidens is Princess Zelda, who telepathically calls for Link and his uncle from the dungeon, starting the game.

After Link and Zelda escape, Agahnim orders the soldiers to find them and kill Link. Once Link obtains the Master Sword, Agahnim raids the Sanctuary and kidnaps Zelda from it, taking her to the upper Hyrule Castle. Once Link reaches them there, Agahnim taunts Link and warps Zelda to the Dark World, claiming that the tribe of evil will be able to overpower the hero and sword if they have the power of gold. Link chases him through a curtain into a small arena, where Agahnim taunts him some more, then begins battling.

In battle, none of Link's direct attacks affect Agahnim. Instead, he must use Agahnim's spells. When Agahnim casts a circular ball of light, Link can send it back at him with the sword or Bug-Catching Net, which will damage him. However, he will also cast a cluster of blue spheres which breaks into several pieces, none of which can be sent back by Link. Finally, he can shoot lightning from his hands across the field. After enough spells are deflected, Agahnim will be defeated, but send Link to the Dark World in vengeance. From here, Ganon takes the role of the main villain.

After Link has saved six maidens and reached the top of Ganon's Tower, Agahnim will appear again and engage Link in another battle. This battle works the same as the first, though he spawns transparent copies of himself, which also cast spells. Once he is defeated again, he turns into a giant teal bat and flies Link to the pyramid, where he breaks through the roof and reveals himself as Ganon.

The Legend of Zelda: A Link to the Past (comic)
In the comic adaptation of The Legend of Zelda: A Link to the Past by Shotaro Ishinomori, Agahnim's role is virtually identical to in the game. However, he is now shown as the one who kills Link's uncle, and kidnaps Zelda from the Sanctuary shortly after the two initially reach it. He is shown to have some level of agency separate from Ganon, though he acknowledges him as his master, while Epheremelda says that they are "good buddies." Throughout the early chapters, he is shown demanding that all traces of the Knights of Hyrule's bloodline be wiped out, realizing that Link is likely one of them. At the end of Chapter 5, Link attempts to kill him with the Master Sword as he tries to send Zelda to the Dark World, but his magic causes the sword to simply pass through him, allowing the ritual to finish uninterrupted while Link becomes paralyzed. However, he manages to break free, and at the beginning of Chapter 6, he defeats him by reflecting his evil magic back at his face, causing his skin to start rapidly melting off. Despite being skeletonized and moments from death, he manages to use his last breath to send Link to the Dark World. He then begins burning away, with the resulting smoke flying off in a way that causes the moon to look like a skull, thus acting as a visual transition to the Dark World's own skull-faced moon. Later, in Chapter 11, a ghostly apparition of Agahnim appears in Ganon's Castle along with ones of Moldorm and Lanmola. Roam charges through it with a sword, destroying it while also incapacitating him. Its remains let off sparks, and Ganon then appears from smoke.

Other appearances and references
Although Agahnim himself does not appear in later games, entities based on him do. Agahnim's Shadow, one of the forms the Shadows take in The Legend of Zelda: Link's Awakening is based on him and uses his spells, aside from the lightning attack. In The Legend of Zelda: Oracle of Ages, a wizard also called Agahnim (Agunima in Japanese, being one letter off from the original Agahnim's Japanese romanization) appears and resembles him in both appearance and behavior, as a minor boss. Another offshoot of Ganon fought in a similar way is Phantom Ganon, which appears more often.

Appearance
In artwork, Agahnim is blue-skinned with red clothing covering most of him. These colors may be to tie him closer to Ganon's colors. In the game, however, he has olive-colored skin with green clothing, for unknown reasons. His in-game skin color is similar to that of Ganon's human form, Ganondorf, as he later appears.