Merlin

The sorcerer is a very powerful magician who crafted a hat with the ability to absorb the essence of any magical being, adding to its own power. The hat, which is sought out by the darkest of people, is protected by his apprentice.

Before the Curse
When Zoso attempts to steal the magical hat, he is confused not to find the sorcerer protecting it. Instead, the old man that is protecting it explains that he's the sorcerer's apprentice. He then fends off the Dark One for a while, but when Zoso breaks past him, he's once again fought off by an enchantment on the hat, which can only be broke by a person who has been tempted by their inner darkness but turned away from it. Many years later, after Rumplestiltskin becomes the Dark One, he too seeks out the hat. He uses Anna and manipulates her into being tempted by her inner darkness, but due to her good heart she turns away from it. He is then able to collect her tear, which allows him to finally break the sorcerer's enchantment on the hat.