Medieval castles were defended through a combination of architecture, terrain, weapons, garrison organisation, surveillance, supply management and tactical planning. No single feature made a castle secure. A successful defence required attackers to overcome several layers of protection while defenders maintained enough food, water, ammunition and manpower to continue resisting. The design of castles varied greatly, but common defensive elements included walls, towers, gates, ditches, moats, drawbridges, barbicans, portcullises, arrow slits and protected entrances.
Natural geography could add cliffs, steep slopes, rivers or marshes. Defenders could also use active measures such as missile fire, sorties and countermining. The effectiveness of these systems depended heavily on the castle's location, construction quality, garrison size and the siege technology available to attackers.
Curtain walls formed the principal defensive enclosure of many castles. Their height made direct access difficult, while their thickness provided protection from missiles and some siege engines. Towers projecting from the walls allowed defenders to observe the surrounding ground and fire along the face of the wall, reducing areas where attackers could approach without being exposed. Round towers became particularly useful in some later designs because their curved surfaces could better resist certain forms of impact and reduced vulnerable corners.
Battlements or crenellations provided protected positions from which defenders could observe and attack enemies. Walkways behind walls allowed soldiers to move between defensive positions. The precise design depended on period and region, and some castles used square, rectangular, polygonal or irregular towers according to terrain and engineering requirements.
Gates were among the most vulnerable parts of a castle and therefore received elaborate protection. A gatehouse could contain one or more massive doors, a portcullis, guard chambers and mechanisms for controlling entry. Drawbridges could cross ditches and be raised when an attack was expected. Barbicans provided an additional fortified structure in front of the main entrance, forcing attackers to pass through another defensive zone.
Some gatehouses incorporated passages designed to restrict movement and expose attackers to missile fire from above or from the sides. Openings sometimes allowed defenders to drop objects or liquids onto attackers, although popular descriptions often exaggerate the routine use of boiling oil. More commonly, stones, arrows and other projectiles could be used. The gate was therefore defended through multiple physical and tactical barriers rather than by a single door.
Ditches and moats increased the difficulty of approaching walls. A dry ditch could be deep and steep-sided, forcing attackers to cross exposed ground before reaching the masonry. A wet moat could add an additional obstacle, although maintaining a large water-filled moat was not practical at every location. Moats also interacted with other features such as drawbridges and earthworks.
The surrounding terrain could be deliberately shaped to create killing zones in which attackers were exposed to missiles while having difficulty using siege equipment. Some castles were built on rocky outcrops or steep hills that reduced the need for artificial obstacles. Defenders benefited when the terrain prevented attackers from bringing large siege towers or artillery close to the walls. Thus, castle defence began beyond the masonry itself and incorporated the wider landscape.
Defenders relied on ranged weapons to make assaults costly. Archers and crossbowmen could fire from towers, wall walks, loopholes and other protected positions. Crossbows offered powerful shots and could be used effectively from fortified positions, while bows could provide a high volume of fire when trained archers were available. Stones, darts and other projectiles could also be used. Larger castles sometimes possessed defensive artillery such as mangonels or other stone-throwing machines, although siege engines were not universally installed.
Missile fire was particularly important during an assault because attackers climbing ladders or approaching gates were vulnerable and often unable to protect themselves effectively. Defenders did not need to kill every attacker to succeed; inflicting enough casualties and confusion could cause an assault to fail.
Castle defence also depended on manpower and organisation. A castle with impressive walls could still fall quickly if its garrison was too small or poorly supplied. Garrisons could include professional soldiers, household retainers, local levies and other personnel depending on the circumstances. Commanders had to assign guards, maintain watches, organise missile fire and ensure that gates remained secure. Supplies of grain, salted meat, dried food, water and other necessities were essential because a siege could last weeks or months. Wells were especially valuable, although attackers could sometimes attempt to contaminate or cut off water supplies. Storage rooms allowed defenders to accumulate provisions before an expected conflict. A castle's ability to resist siege was therefore partly an exercise in logistics.
Defenders could also take offensive action. A sortie involved soldiers leaving the castle to attack siege works, destroy equipment, capture supplies or disrupt enemy operations. Sorties were risky because defenders could be cut off from the castle, but a successful attack could significantly delay a siege. Defenders might also conduct countermining when attackers attempted to undermine walls. If besiegers dug tunnels toward the foundations, defenders could dig their own tunnels to intercept them or reinforce threatened sections.
Fire could be used against wooden siege equipment, while heavy stones and missiles could damage siege towers. Negotiation was another defensive strategy. A garrison might seek favourable surrender terms when continued resistance became impossible, while attackers might offer safe conduct or threaten severe consequences. Medieval sieges were therefore contests of strategy and negotiation as well as physical strength.
The introduction and development of gunpowder artillery gradually transformed castle defence. High medieval walls were designed primarily against ladders, rams, mining and torsion or counterweight siege engines, but powerful cannon could eventually damage masonry from a distance. Defenders responded by constructing thicker, lower walls, rounded bastions, earthworks and more complex artillery positions. Some medieval castles were modified rather than immediately abandoned. The evolution illustrates a general principle of fortification: defensive architecture changes in response to offensive technology. Medieval castle defence was consequently not a static system. Its effectiveness depended on matching architecture, manpower, supplies and tactics to the weapons available to the attackers.