The valley was blocked over its entire width by the natural series of hills called Helm's Dike and behind that lay the fortress of Aglarond or the Hornburg, at the entrance to the Glittering Caves.
A long causeway wound up to the great gate of the fortress itself. Inside the keep there were stables and an armoury, as well as a great hall in the rear which was dug out of the mountainside. There also was a great tower (the Hornburg) the top of which consisted of the great horn of Helm Hammerhand. The Deep which stood next to the fortress was barred by the long Deeping Wall, which consisted of solid rock except for a small culvert which allowed water from the Deeping Stream to enter; this rendered a fresh supply in sieges of great length. The Deeping Wall itself stood 20 feet tall; it was wide enough for four men to stand side by side. Access to the fortress from within the Deep was made possible by a long stair which led to the Hornburg's rear gate.
It was said in a myth that Helms Deep would never fall while men defended it. No enemy had ever breached the Deeping wall, or set foot inside the Hornburg, but in the year , during the War of the Ring, Saruman's army of Uruk-hai managed to almost overwhelm the defences of the Rohirrim. This was achieved by the orcs using an explosive blast of fire within the culvert which when detonated, destroyed the main defences. The origin of this explosion is unclear and Tolkien denotes it as "Saruman's devilry." In Peter Jackson's The Lord of the Rings film trilogy this weapon is depicted as gunpowder.
When Cirion, Steward of Gondor, gave Calenardhon to the Éothéod, Aglarond was transferred into Rohirric care, who named it Súthburg (southern burg in their language). The Gondorian guard was merged with that of Angrenost to the north, which remained in the keep of Gondor. Guard duty of the Fords was initially shared between Gondor and Rohan, but later maintained only by the Rohirrim.
During the reign of Helm Hammerhand, Rohan was attacked by Dunlendings from across the river Isen. Edoras was taken, and Helm and many of his people retreated to Súthburg. Because Helm always blew a great horn before riding out to fight the beleaguering Dunlendings, the keep was renamed Hornburg. During the War of the Ring, the Hornburg was the refuge of the Rohirrim as they defended Helm's Deep.
After the war, Gimli the Dwarf, who fought in that battle, established a colony of Durin's folk there. Aglarond lay in front of a huge and very beautiful cave system, which proved irresistible to him. Gimli became known as 'the Lord of the Glittering Caves', although this new realm was presumably under the overlordship of Thorin Stonehelm, his kinsman and heir of the lordship of all Durin's Folk. The dwarves of Aglarond restored the Hornburg following the War of the Ring, and it became a fortress they shared with the Rohirrim.