Note: Changes in the proper order of events, the characters, and the camera's focus are the fault of my Muse more than Peter Jackson, but this is definitely Kiwi Tolkien. Brace yourselves for scattered battle scenes, and enjoy the story.

Part I: Helm's Deep

Auth anglenna a er-rochon ú-thia.
Cû mín vi camen. Nae boe enni vellon a ú-goth.

(Battle approaches, and one rider does not appear.
My bow is in my hand. Alas, it is friend not foe I need.)

Théoden strode out of the king's hall, past the crumbling knees of Helm Hammerhand's statue, and circled the outermost ring wall of the keep. His boots rang heavily on the flagstones. Flanked by his guard, the king mounted the stairs of the gate's overlook, a battlemented platform which jutted like a ship's prow towards the deserted plains of Rohan. He braced his hands against the weathered rock of the parapet and looked to the north. Soon the gravelled flats before him would be filled with a vast army. Only the inner and outer keep, the great Deeping Wall spanning from its ramparts to the opposite cliff, and the keep's high tower stood between his people's mountain refuge and an endless tide of swords.
No foe has ever taken the Hornburg, so long as men are left to defend her, the king proclaimed in a booming voice. Warriors in the courtyard behind him straightened with a scuff of chain and metal.
Their dwarven visitor gave the broken statue a sober glance, then rapped the back of his mailed fist against a railing. There is good stone here, Gimli acknowledged.
Foes shall break upon our walls like water against rock, Théoden stated with proud conviction, turning back towards the bailey and the tower.
Only one set of shoulders was not flung back as the king's words kindled the hope his men so desperately needed to survive the night. The elf stood off to one side, gaze turned inwards. There was neither fear nor grief to be seen on the ageless face, yet he might well have been stone himself.
He was just one warrior in three hundred: the king had many more pressing concerns. But there was no other like him. Théoden had begun to believe the legends about his strange folk of whom the Rohirrim spoke with whispered fear. Right now the fair-faced youth— no, older than trees, as the king often had to remind himself— seemed nearly human, although he mourned the loss of a comrade in a very different way from humankind. He was quiet. Only that.
Théoden rested a hand firmly on Legolas' shoulder as he passed, enough to make the elf stir and fix blue-gray eyes on him before inclining his head courteously to the king. Then Théoden passed back into the citadel and launched into a rapid spate of commands to his followers. The doors boomed shut behind them.
Gimli came to a halt by the elf and gave him a long look. It is good stone, he said, voice even gruffer than usual.
Legolas dropped his gaze to the dwarf and smiled quietly.

Together they turned and strolled back towards the Deeping Wall, drawing whispers from men who did not know about elven hearing. Their journey took some time, for there was no easy way between the citadel and outer defenses. They passed through the narrow tunnel delved in the bailey's outer wall, along a high parapet that hugged the massive outcrop on which the Hornburg was built, and down a long, broad set of steps to the deep garth. Here men were hurriedly gathering rocks as crude missiles for the murder-holes, setting up watchfires, escorting the women and children back into the tower and the caves beneath it. Elf and dwarf drew stares as they passed among these people, but also stammered words of thanks. Then the pair climbed the nearer of the two long stairways hugging the stout wall's inner face. From there they could survey the Deeping Coomb, a great gorge between two steep spurs of the mountains, whose jaws lay open towards the Gap of Rohan and distant Isengard.
It was drawing towards sunset, and massive stormclouds were eating up what light remained in the sky. The air was warm, strangely stifling, and too dry for the season, as if the clouds above were full of smoke instead of rain. The sun had fallen behind the mountains, and their somber shadows stretched from cliff to cliff, covering the long causeway leading up to the main gate of the Hornburg. In the distance, the fields of Rohan were yet sunlit, but a dull haze, tinted red in the last hour of the day, lay heavily upon them.
All these things they saw, or at least the elf saw them. The dwarf did not pay much attention: he had his axe. They stood looking out and sharing very little speech, the last two companions— for all they knew— left of the Fellowship. The Rohirrim gave the pair a respectful distance. Neither dwarf nor elf were the sort to ponder how they of all their race had come to be there, in a fortress of men whose prospects of lasting the night were slim, but there were mutters around them from men who had time, too much time, to think right now.
Behind and below them in the Deep, Théoden's captains were distributing spears, swords, helms and mail to all the able-bodied men among the families who had taken refuge there at their king's bidding. Gimli trudged over to the edge of the wall-walk and stooped to inspect their equipment. He grumbled. Peasants, and most have seen too many winters.
Or too few, Legolas returned, not turning around.
The dwarf heaved an exasperated sigh. Then he raised his head, catching an echo in his helm of a sound dim and far away. It sounded like a marsh-bird's mournful cry, but Gimli knew it was something else. Friend or foe? he asked diffidently.
Legolas had straightened behind him. That is no orc horn, he said fiercely. He turned and raced for the nearest staircase. Théoden King!
Blinking, Gimli started to follow his fleet companion, then pulled up short and squinted out through a crenel. There were points of light in the gloom, and they were not torches. The faint glint of gold was like a river of fish coming towards them. Yes. It had to be a small host on the march. Not Éomer's, however, for they were on foot. Perhaps more men of Rohan?
Make ready to open the gate! Théoden shouted, striding towards the stairs up to the keep. Legolas was dashing ahead of the king— curse the boy, following him was like trying to snatch a spark sprung from the forge— and was already out of sight by the time Gimli reached the head of the stairs.
More of those wights! said a soldier leaning on the parapet.
marvelled the younger man beside him. It's more elves!
Much good that will do, the graybeard muttered.
Gimli moved up beside them and peered out. Elves? But the men's eyes were not deceived. The flashes of gold had resolved into figures moving like links in a chainmail shirt, in perfect unison.
Gimli growled to the men taking no notice of him, You'd best keep your voice down, horse-master. You're within their arrow-range.
He grinned dourly at the men's expressions as they turned and stared at him. The elven company was still half a league away.

When Gimli finally reached the courtyard behind the main gate, the doors were already open. It took some elbow-work for him to reach the king and plant himself at Legolas' side. Around them, tense guards gripped spears and swords, watching the darkness beyond the portal, unsure after all what might be coming. The stones trembled lightly, but the tramp of the marching host was muffled even when the front ranks came through the gateway without breaking stride. Théoden's people were caught offguard. There was a general rustle of indrawn breath, creaking leather, and weapons clenched as the men awaited word from their king.
The dwarf recognized the elf who came forward, bowing courteously to the king. I am Haldir, he said smoothly. I bring word from Lord Elrond of Rivendell. Long ago there was an alliance of elves and men against the foes of the free world. Now again the Enemy has arisen, and it is time to renew that alliance. I bring five hundred bows in token of this. Where shall we stand?
Théoden, dumbfounded, took a moment to find his voice. Captain Haldir, you and all your folk are more welcome than the tongues of my men can speak. You may stand anywhere in Rohan you have a will.
Your walls are broad, said Haldir.
The king studied him, taking the elf's measure and collecting his thoughts. Then the man smiled. Come, lord, and you may be the judge.
Haldir inclined his head to Théoden, and a second time to Legolas who stood beside the king. The Rohirrim raised their spears and parted, drawing back against the ring-walls and standing at attention in wonderment and unease. Théoden turned to lead the way, and the elves followed him without looking left or right. Behind the last mailed foot, the causeway doors came together with a dull boom.
Mae govannen, Legolas said in a low, eager voice to Haldir, falling in beside him. I did not look for your coming.
Where is Lord Aragorn? Haldir queried. I carry a message for him from Imladris.
A gleam of silver appeared in Legolas' palm in reply. The Evenstar lay there, even brighter amidst the gloom and the walls of men.
What is this? Haldir asked sharply.
The Mirkwood elf shook his head.
We were ambushed by Warg-riders on the road to Helm's Deep, Gimli growled, stumping along next to his friend. We fought to keep those devils from slaughtering the common folk: peasants, women, children, all those we were guarding on the way here. We couldn't find Aragorn anywhere when the battle was over.
He fell, Legolas said bluntly.
The elf-host came to a halt between one step and the next. There was a ripple of... something... through their ranks. No expression changed, no word was said, and yet it was as if a cold wind had passed among them. The men of Helm's Deep looked at one another in consternation. The king stopped too and turned, his jaw tightening as he realized the cause of the hitch.
Then we are needed all the more, Thranduilion, Haldir said, breaking the tense silence. He resumed his march, the other elves following as before. There were murmurs of relief and approval from the men lining the walls who had been watching this exchange. King Théoden gave Haldir a grim nod of thanks before passing through the narrow tunnel leading out to the deep garth. When they had reached the bottom of the stairs and open ground, again, the elves did not pause, but simply parted, half of them taking up position on either side of the stream that divided the garth, and half heading for the battlements of the Deeping Wall.
Théoden asked Gimli, when the dwarf came up beside him.
Legolas. His father Thranduil is the king of Mirkwood in Rhovanion, he answered loudly.
Many heads turned, although most of the men were staring towards the glittering host of elves already. Several conversations were cut short or triggered by Gimli's revelation. Théoden gave the reserved green-clad elf a look of fresh appraisal. Long ago by men's reckoning, the Rohirrim had dwelt in Rhovanion, west of the great forest.
Gimli noticed Legolas looking towards him with a wry expression. The dwarf drew himself up with an audible huff. He was careful not to smile when he spotted a hint of a grin flicker across the elf's face.
One other pair of eyes was fixed keenly on Legolas' shoulders as he mounted the steps beside Haldir. The watcher was smaller and stockier than the rest of the company, and moved in step but not with the grace of elvenkind.