Rin was sixteen again – how many centuries ago was that, now? – and walking between paddy fields behind her mistress, Okiku. In her memory, Okiku was strolling slowly and playing a flute, her hair unbound and nearly covering her red and white shrine robes. Okiku's face was flat and undistinguished, but her hair was a shining fall that she liked to show off whenever she went out. It would be a mass of knots by the end of the day.

The melody wandered off halfway through a song and slid into self-indulgent swoops. Rin rolled her eyes. So much for sacred melodies. Lady Okiku's reputation spread far outside the province and she was lazy and coasted on it. People came from Shikoku, from the Tosando, even from distant Edo to pay silver for her protection charms and gold for her purification rituals. Okiku was three years younger than Rin and seldom had anyone telling her no.

Okiku abandoned the swoops and dropped the flute. Rin picked it up without missing a step.

"I'm bored," Okiku said, casting a disconsolate look around the rice fields. "This patch of lands is clear. There are no spirits to call, it's supernaturally empty."

"If it was supernatural there'd be spirits," Rin said, tucking the flute into her belt.

"Oh, so clever, Rin," Okiku said. (Only the way she said 'Rin' rang oddly in Rin's memory. Did Okiku always say it like that?)

"Try playing the flute," Okiku said. "Maybe they'll come to you."

Rin raised her eyebrows and blew. It made a sound like a whistling pig.

Okiku covered her ears, but she was laughing. "Stop!" she said. "Making that sound is probably a beating offence."

Rin grinned. "A beating is shouting outside during rituals, that's probably execution."

Okiku's eyes narrowed suddenly. They were fixed on shadow by Rin's ear, the first time she'd looked at her properly this morning. They'd both been busy. "Someone hit you," she said flatly.

Rin had tried to explain, time and time again, that stewards and senior priests and anyone in power motivated underlings with cuffs round the head. But Okiku was a shrine maiden and untouchable, and had an endearingly peculiar belief everyone else should be untouchable too, starting with her attendants.

"It doesn't hurt," Rin said instead, which was the absolute truth and Okiku never believed it.

Okiku was scowling furiously. "I am going to have words. Who was it?"

"The steward. Look, we should try that forest," Rin said. "Unless you want to go back with no spirits. The other shrine maidens will have found theirs already."

Okiku was easy to divert like that. She turned, her hair fanning out, and glared at the forest with all traces of her good mood gone. "They had better be in there," she said.

Rin laughed. "You'll really pull them in with a face like that." Okiku ignored her and grabbed the flute from her belt again.

The late autumn sun made the fields feel like summer. The forest should have been cooler but, to Rin's unease, the air just felt closer. It moved in little warm breezes around them and sometimes seemed to curl against Rin's skin like the flick of a cat's tail. Okiku seemed to have picked the eeriest flute song she knew. Rin shivered.

The path they were following started broad enough for two horses abreast, but after very little time it had narrowed down to little more than an animal track. Rin soon stopped peering in the trees. She wasn't sure she actually wanted to see anything.

"Look at this, Rin," Okiku said, bending down. By the side of the narrow track, nestled in the roots of a tree, was a tiny stone figurine. Some kind of miniature dog, its mouth open and its tongue lolling out. It should have been friendly. Its posture reminded Rin of something.

She found she'd backed away. "My lady, no," she said. "Don't touch it."

Okiku looked at her in surprise. "Don't be silly," she said. "It's just a dog statue. There's power in it, though. I can feel it."

"If there's power in it then why are you picking it up?" Rin had backed away another step.

"Because there's power in it," Okiku said. "And dog spirits are friendly."

"You don't need it," Rin said. She didn't know where this opposition was coming from, only that the dog's painted black eyes looked far more awake than stone should.

"I want it," Okiku said, weighing it in her hand. "I can use it." She saw Rin's face and laughed. "I won't make you carry it."

She turned away. As she did, there was a roaring, and the sound of a rushing river. Rin looked over her shoulder, and saw, impossibly, dark water rushing at them through the trees, as high as a house. Okiku shrieked. The light was draining from the forest as if something had covered the sun.

Rin grabbed for Okiku's hand as she backed away. "Run!" She found it and pulled hard, but Okiku seemed rooted to the spot, staring at the water. There was no time—

The river hit, and they were both lifted off their feet.

We're going to hit the trees, Rin thought, panicked. We're going to be battered to pieces. But miraculously the trees seemed to have gone. She couldn't tell if she was sucking in air or unreal water, but she choked anyway. After a short eternity of nausea and spinning darkness, some kind of hook snared the back of her kimono and hauled her out.

When the darkness cleared from her eyes, she was sprawled on a muddy shore. In the distance there was what looked like a village. Rin pushed herself up with shaking arms. That couldn't be right. There were no villages round here.

But straight up ahead there was someone who spelled authority. A small, shrivelled old woman with gold-weave kimono and her hair dripping with jewels was regarding them unfavourably. There were two monstrous dogs either side of her, their shoulders as high as the woman's head. Other strange shaped spirits stood around: animals in kimono and ladies with extra sets of eyes in their forehead. A frog was leaning on a boathook, looking pleased with himself for hooking them out.

"Thieves," the woman said. Her voice was like nails on glass.

"No," Rin said, eyeing the dogs nervously. They looked like the figurine.

"No!" Okiku echoed indignantly, struggling to her feet. "How dare you!"

The dog on the left growled and bounded forward, bending down to snap near Okiku's hand. She went pale and dropped the figurine, which the dog picked up carefully in his mouth. He brought it back to lay at the old woman's feet. She leaned down, muttering as if her back hurt, and picked it up.

"A Guardian statue," she said, looking up. Her tone was arctic. Rin suddenly remembered where she'd seen that posture before – it was how the guardian lions of shrines sat.

"We were just looking at it," Rin said. "There's no harm in looking."

The old woman stared at them for another moment. "Kill them," she said.

"No!" Okiku shouted as the dogs exploded forward. There was a weight on Rin's shoulders and suddenly she was on her back, staring at the sky, her head whirling. Okiku was choking out words beside her, under the growling of the other dog. "I was going to take it! It was me, don't hurt her!"

The dog on top of Rin stopped, sniffing at her. The woman cackled. "Now we hear it," she said. "Little girls out of their depth. Stand up, girl."

Okiku got to her feet, but of course she didn't stop talking. "It's only a small thing, and I can put it to good use," she said. "Haven't you heard of me? You must have heard of me if you've heard of Izumo shrine. I did a protection charm for the shogun."

Yubaba was giving her an amused and incredulous look. She snapped her fingers and the dogs returned. Rin swallowed a groan and pushed herself up to a sitting position, clutching her stomach where the dog had rested its enormous paw.

Sitting on the ground meant she could see Okiku's feet. And as she came out with excuse after excuse, her ankles and robes were turning slowly white.

Rin recoiled, her whole body prickling. This was magic – very, very wrong magic. Okiku was still coming up with steadily more confident excuses as Rin pushed herself to her feet, dread collecting in her stomach. She grabbed Okiku's shoulder. "Lady Kiku," she said. "Shut up!"

"Stop it, Rin," Okiku said, trying to shrug her hand off. The white was creeping up her legs, faster and faster, and she hadn't even noticed. "When she hears –" Even as she spoke, the white was flowing up her chest. Her eyes widened, and she tried to say something, but that was the moment it caught her throat. All that came out was a strangled noise.

Rin stared at her, frozen with horror. Her clothes no longer moved with the breeze. Her eyes didn't blink. Every hair had turned into the finest carved thread of stone.

Yubaba gave a cackling laugh and hobbled up to her. She and Okiku were about the same height. She reached up and touched the ivory cheek. "Very nice," she said. "Shall we smash it? Might be worth more as shards."

"No!" Rin said, putting a hand in between them. "I don't know what you've done, but turn her back!"

For a moment, she was afraid that she was going to get exactly the same treatment, but Yubaba merely stamped her stick near Rin's foot. Rin jumped back.

"Why would I want to do that, girl?" Yubaba said. The way she peered up into Rin's face made Rin feel she had the spiritual defences of a small puddle. "Have you got anything to offer me?"

Rin hesitated and stayed silent, thinking wildly. She didn't have anything that might be of interest to a spirit. "What do you want?" she said at last.

Yubaba smiled, showing a set of predatory teeth that didn't look like an old lady at all. "Well, my dear, since you ask so nicely," she said. She raised a hand and a scroll slid into it from her sleeve by magic. "Your name will do."

Rin didn't look at Okiku's stony, nauseatingly still presence by her side. Her stomach felt like a solid ball of lead was nestling in it, growing heavier by the moment. "If I give you my name, what do I get?"

"A reprieve for your friend," Yubaba said, still smiling. Her eyes were harder than any Rin had seen. "And a condition. To turn her back."

"An impossible one?" Rin said. She'd heard enough tales of spirits.

Yubaba cackled. "So suspicious for one so young! Of course not, my dear." She unrolled the scroll, the very bottom of which looked like some sort of contract. "Just difficult."

Rin glanced at Okiku and swallowed hard. "And if I don't?"

Yubaba raised her stick and tapped at Okiku's arm. It made a hollow, fragile sound.

Rin pushed back her sleeves. "Give me a writing brush," she said grimly.