Helm’s Deep was a narrow valley in the White Mountains. Within this there was a fortress known as the Hornburg. The Hornburg was built by the old Gondorians (Numenoreans) along with Isengard to defend the Fords of Isen. Along with the keep was the Deeping Wall to defend the valley and Helm’s Dike to defend the hills outside. Inside the mountain behind the keep was the Glittering Caves, a complex escape route of tunnels. When Rohan became independent Helm’s Deep became a garrison for the Rohirrim, and served them well during a succession war with the Dunlendings. During the War the people of Rohan under Helm Hammerhand withstood a long siege against the men of Dunland, but were ultimately victorious when Gondor came to aid them. Helm Hammerhand died after blowing the great horn in the keep and leading a sortie against the Dunlendings. During the War of the Ring it was used as a last refuge for Rohan’s people as the forces of Saruman attacked. The garrison of Edoras, The Three Hunters, Rohan’s royal family, and refugees from the countryside all went to the fort, Gandalf went to seek the disbanded Rohirrim roaming the countryside and promised to return with reinforcements. Saruman attacked with an army of Uruk-Hai, Orcs, Dunlendings, and siege weaponry including rams, ladders, and “blasting fire” (possibly or similar to gunpowder). The Battle of Helm’s Deep consisted of a skirmish at Helm’s Dike, the prolonged fighting at the Deeping Wall ending with a large breach in an open culvert (courtesy of Saruman’s “devilry”), and the final battle for the keep. With the remaining Rohirrim and the Three Hunters trapped in the keep defending the women and children in the Glittering Caves, they sallied forth once more under the horn of the Hornburg to meet the enemy. They rode out into the horde as Gandalf returned with an army of Rohirrim. Saruman’s forces were routed, and the retreating orcs and Dunlendings were destroyed by the Huorns (Ents) of Fangorn. The uruk-hai and orcs were piled into a large mound while the dead Rohirrim were buried. The fortress was rebuilt with dwarven stonework, a new gate, and the Glittering Caves became a dwarf colony under Gimli.
“’This is more to my liking,’ said the dwarf, stamping on the stones. ‘Ever my heart rises as we draw near the mountains. There is good rock here. This country has tough bones. I felt them in my feet as we came up from the dike. Give me a year and a hundred of my kin and I would make this a place that armies would break upon like water.’” - Gimli upon inspecting the fortress before the battle. The Two Towers, Helm’s Deep.