The three – tired, hurt, victorious – staggered back through the school. They made their way past the destruction to the remains of the Great Hall, looking over the bodies being prepared to be taken away by their loved ones. Ron ran over to join his family, bowed over the body of their beloved Fred.

'Harry,' Hermione said tentatively. 'I know you want nothing to do with the Hallows, but you could relieve a great deal of pain today. If you used the stone, that is. Nothing else.'

Harry turned to his friend. 'Hermione – you read that story at Luna's house. You know we can't – the dead won't truly come back. They'll be phantoms, causing more suffering for those who live. It won't work.'

Hermione nodded briskly as if to calm him and the pair parted – Harry to sit in vigil by the bodies of Remus and Tonks, while she darted off to the ruins of the library. Filch was there, sweeping out some of the rubble – a hopeless task, but it seemed to be helping him. He looked up as Hermione climbed over a pile of broken shelves to the Restricted Section, still partly intact. For once he didn't bother to challenge her right to be there. Madame Pince was still in the Great Hall, compiling a list of relatives to be contacted.

Hermione scanned the remaining shelves desperately. She knew that if Tom Riddle had found out anything about immortality and Horcruxes there, then she might find more information about reviving the dead than was to be found in a children's story. But there was nothing.

Defeated, she slumped to the ground, bumping her head as it banged against a shelf. The pain made her grimace and throw her head back, and then she saw it. Or rather, she saw nothing, because what her eyes fell upon was an empty shelf. 'Of course!' she gasped to herself. Those books had been removed by Dumbledore and hidden in his study for decades until she herself had summoned them. What she was looking for had been with her the whole time.

Quickly she rummaged through the small beaded bag still tied her to belt. Here it was, a large, black volume: Secrets of the Darkest Art. Flicking through it, past the well-thumbed sections on Horcruxes, she came to the section she had been hoping for. In all the past year, focused so intently on finding and destroying the Horcuxes, she had barely registered that the book also dealt with the Hallows, yet here it was – a chapter about each of them, their powers, their dangers, their alternative uses. She turned to the chapter about the Stone and read quickly, sitting herself down on the broken floor, ignoring the dust and stones beneath her.

Finally, she looked up triumphantly and dashed out to find Harry, now talking with a desolate couple – Lavender's parents, who had just arrived at the castle. As soon as she could make eye contact with Harry, he ushered them over to sit with their daughter's body beside Pavarti and Professor Trelawney and excused himself.

'What have you got there, Hermione?' he asked, nodding towards the book clutched in her arms.

'We can do it! I mean the stone can,' she told him excitedly. 'Only once. We can avoid the curse of the Stone if we don't choose who we're bringing back, because then our intentions would be pure, not self-serving. It can't be done by anyone who has already used the stone, so it can't be you this time. And it must be done on the day of their death. There's an incantation here for a spell to bring back one person properly.'

Harry looked baffled, so she pressed on. 'Properly,' she repeated. 'They'd be back, as themselves, not a ghost or a phantom. See?' And she thrust the book at him.

As he scanned the pages, she continued. 'It does say that whoever the Stone brings back would lose a little of themselves, but surely that has to be better than no life at all! I can do it. I've read the incantation through, and it looks possible. Complex, but possible. We only get one chance and then, look, it says the Stone will vanish for a generation.'

Harry pointed at some lines near the bottom of the page. 'Look, Hermione, are you sure about this? It says here "whosoever casts the spell shall be bound to the life they save". What if the stone chooses to bring back Voldemort? Or Bellatrix or some other Death Eater? I wouldn't want you being bound to one of that lot, whatever that means. After all we've been through? This is real dark arts stuff, isn't it?'

Hermione shrugged. 'I have no idea who I'd be bringing back, right? If it does bring back someone hideous, then perhaps we can quietly despatch them again, though I know that sounds ruthless. But I can't imagine it working like that, if my intentions are pure. Surely it'd bring back someone worth saving?'

'Well, it sounds all very fine, Hermione', Harry countered, 'Except I don't have the Stone any more. I dropped it somewhere before I went into the Forbidden Forest to face Voldemort. It'll be impossible to find.'

Hermione's face fell, until she had a flash of inspiration. 'Use the Snitch! The Stone was kept inside it for so long, possibly it will lead us to it. It remembered your touch – perhaps it will remember the Stone hidden inside it?'

Still reluctant, but finding it hard to fault her reasoning, Harry pulled the Golden Snitch Dumbledore had left him out of his pocket. It hovered in the air in front of him, but remained static, as if waiting for guidance. He caught it and pressed it gently to his lips. It did not open this time, but darted out in front of Harry and Hermione, moving more slowly than it would in a Quidditch match, so they could keep up. Hermione seemed to be right – it was leading them back to the Forest where Harry had dropped the Resurrection Stone. Eventually it stilled at the edge where the trees began to get thicker, just beyond the smoking ruins of Hagrid's hut. Hermione rummaged in the leaves where the Snitch had landed and eventually pulled out the tiny diamond-shaped stone – once the home of an evil curse, now a seemingly innocuous pebble. She murmured the first part of the incantation from the book and turned the Stone three times in her hand. The Stone began to shiver slightly, and slowly a bluish, pulsing light appeared around it. It darted up to Hermione's chest to lie for a moment beside her heavily beating heart. Then it slowly moved away, as Hermione stumbled after it, tugged by an invisible string.

'It's pulling me!' she marvelled. 'Harry – I think it's working.'

She crammed the book in her pocket and followed, never taking her eyes off the Stone, hoping desperately in her mind that it would bind her to someone bearable, not one of the enemy they had faced that day.

She and Harry moved slowly forward until the Stone had taken them back into the grounds of the school, across the quadrangle, and into the Great Hall. They followed past the bodies of Lavender, Tonks, Remus, Colin, past the door of the ante-chamber in which their fallen foes lay, until they reached the cluster of red heads at the back of the Hall.

The Stone quivered again and tugged Hermione over to Fred, and then settled itself on his heart. Cautiously rejoicing inside, she completed the second part of the incantation, as the Weasleys looked on without a clue what was happening. Everyone watched, astounded, as the blue light flashed to a warm white and the Stone vanished, seemingly evaporated into his body. Hermione whispered the last line of the spell with her eyes tightly shut, hardly daring to hope it would bring him back.

At last came a sound – a deep cry that burst out of Molly – and Hermione allowed herself to open her eyes. 'What have you done, girl?' Molly sobbed, unable to quite believe what had just happened. Fred's eyes had opened slightly and he looked fuzzily around the faces bent over him until his gaze at last focused and locked with Hermione's. After a long moment, he rolled over from the stretcher he had been laid out on, and vomited out a thin stream of green bile.

Molly hurled herself at her son in a volley of fresh, happy tears, not minding that she was kneeling in the puddle he had just created, and the family crowded round their brother. Yet Arthur hung back and grasped Hermione by the shoulders. 'What was that, young lady?'

Hermione tried to brazen it. 'What was what, Mr Weasley?'

Arthur shook his head vigorously, as if trying to shake away any doubts she had created. 'No, my dear, I saw you. You… cast a spell on Fred. I saw… something… on him, and then it disappeared into his body when you said some words. I'm sure Molly saw it too. And I know an incantation when I hear one.'

Hermione gave up and pulled the book from her bag. Arthur took it, but was too dazed to absorb it properly. 'This says dark arts. You haven't used dark magic, have you?' he asked. 'I don't think we could bear having Fred back under a curse.'

'It's not dark magic the way I performed it,' Hermione answered. 'It says he'll lose a little of his former self, but he's back – properly back – and I think Fred has had enough life force to be able to cope with losing a little of it.'

Arthur gave Hermione one last enquiring look and then took her in his arms briefly, before he turned back to his family, joining in the happy embraces. She hugged herself, not quite able to believe the power of the spell she had managed, and felt an arm slip around her shoulders. Harry. 'You did a really good thing, Hermione,' he said in her ear. 'I should never doubt you. One day I'll figure that out.'

Hermione leant her head on Harry's shoulder, taking comfort after the day's events at last. Fred was still buried under the red heads of his family, but she saw him looking intently at her over Ginny's shoulder as his sister at last had her turn to hold him tight. 'I need to talk to her,' he said – his voice husky, the first time he had used it in this life. The Weasleys fell back a little, and Hermione stepped over to kneel beside him. She heard George drop down on his knees beside her.

'This spell you've done,' rasped Fred. 'Am I cursed now?'

'No,' she said softly, taking one of his hands in hers. 'I would never bring you back under those terms. I think you can just live out the rest of your life now. There may be… changes, but I think in essence you'll be the same as before.'

A howl at last broke out from George beside her, and he bent double, wracked with sobs as he allowed himself the release of his emotions. She felt him fumble for her, and held him in her arms until the worst had passed. She sat there with the twins for some time, until the needs of their family took over and she stood back, watching them all marvel over their revived son and brother.

She felt a tap on her shoulder. Minerva McGonagall had appeared beside her. 'A word, please, Miss Granger. I think we have things to discuss. Bring that book with you.' The new headmistress of Hogwarts swept off briskly, leading the way to the study that was now hers.