Bristow's demon index, page 205
"Anyanka, patron demoness of scorned women:
This demoness embodies the spirit of self-defeating vengeance. She grants her victims their most vindictive wish, but the evil they desire is then turned upon them. No good can come of Anyanka's aid, only despair and damnation.
Her name first became known in 1207, but she is reliably thought to have been active for decades before then. After considering evidence from the surviving records of the Knights Templar, all omens observed during the relevant time period and the boasts of Anyanka herself, on those occasions when she has been cornered, the following conclusions have been reached concerning her origins.
Anyanka was once a human girl, born in France sometime during the 9th century. She was courted by the son of a local nobleman, but soon discovered his fine words were but a cloak to hide his pursuit of carnal pleasures. When he greeted her ambitions of honest marriage with derision she was filled with a blinding rage. Unable, because of her lowly status, to obtain redress through legal means, she turned to the dark arts in pursuit of revenge, inflicting upon her unfortunate seducer all the torments her mortal mind could imagine. Her rage was so great, hell itself echoed to the sound of her fury. The infernal powers, amused by her petty malice, chose to offer her immortality in their service.
The precise terms of the bargain she struck are not known, but it is thought that, in exchange for the loss of her mortal soul, she was offered a chance to help any women who, as Anyanka had been, were treated with utter contempt by the men they loved. However, all the gifts of hell are poisoned. The spirit of her bargain was betrayed even as she made it. Without her human soul, Anyanka lost all understanding of morality and readily accepted a perversion of her original mission. She was given the power to grant the wishes of scorned women, but with a catch. While her aid would appear beneficial on the surface, it would always poison the lives of her victims.
Nothing good can be built on hell tainted foundations. So it is with Anyanka's wishes. After one brief moment of sweet revenge, all the fruits of victory are found to be maggot-ridden. The victim can gain no lasting satisfaction from her wish, and ill-fortune will dog her all her days. She becomes a nexus of malign probabilities similar in nature to, though of much lesser magnitude than, the mystical convergence characteristic of an active hellmouth. None of Anyanka's victims have ever lived happy lives. Some few have even died as a result of their wish, or been driven to suicide.
Anyanka's human soul was placed, without her knowledge, in the gem she calls her power centre. Her victims must touch this gem to make their wishes, but otherwise she keeps it with her. While the gem is intact Anyanka can not truly die but if it is destroyed, her soul will return to its body, rendering her mortal again, and negating the last wish granted. Since this may be one of the signs that the last days are upon us, it is recommended that this should not be done unless absolutely necessary.
For a fuller account of Anyanka, her history and her powers, see Dramius, Volume XLVI, pages 876-924."
Written by retired Watcher, Samuel Bristow, 1825 AD
Cordelia began to speak, then hesitated. This was the hellmouth, where weird things always happened. People became invisible just because they were ignored, which really hadn't been her fault. It would be just like the hellmouth to have her wish come true, which should be fun for her. Xander would suffer, of course, but he deserved it. Perhaps Anya's lucky charm might actually be magic, or some invisible fairy might be listening, or something. This deserved a moment's thought, just in case her wish worked.
She had been about to wish Buffy had never come, things would have been so much nicer then, but was that really the best she could do? Without Buffy, she'd still be popular today, still have the adoration she deserved, and she wouldn't have been involved in all those icky things. She would never have known the monsters were real, never been afraid. Life had been so much nicer when she hadn't known what terrors lurked in the dark.
But the monsters were real. Her hometown was built on the mouth of hell. Monsters walked its streets, plotting the destruction of the world, and only Buffy could stop them.. Xander put up a brave show, but without Buffy he'd have been dead within weeks, and that would be no fun at all. She didn't want him dead; she wanted to watch him suffer. And besides, without Buffy, she'd probably be the bride of Frankenstein right now.
Everything had gone wrong since Buffy arrived, but without her it might have been even worse, if things could get any worse than this. If only she could live the last two years over again, without making any mistakes, then she could have the perfect world she deserved.
Cordelia smiled. That was it, the perfect wish. It probably wouldn't work, but it would be nice if it did.
"Everything has gone wrong since Buffy arrived. I wish I could live it all again, but better".
Anya looked puzzled.
"I'd know what was going to happen, so I could make everything go right for me and wrong for Xander. I'd make him love me, then dump him and humiliate him. I'd know all their secrets so I'd be able make all his friends reject him, leaving him miserable and completely alone."
As Anya listened, she began to smile. Cordelia didn't notice. Lost in the vision of the perfect world she could create, she had forgotten Anya was even there.
"Everything would be just horrible for him, but perfect for me. I'd even be able to play the big hero. I'd make myself saviour of the world, and Buffy could be my sidekick. It would be wonderful."
Cordelia fell silent, her face glowing with joy at the thought.
"Done!" Anya shouted, her face suddenly hideous.
In a blinding flash of light, the school vanished.