To defend themselves, local leaders revived and improved ancient techniques of fortification and assault. The castle builders (military enlii gineers) and commanders of the Middle Ages continued the siege warfare techniques developed by the Romans, modifying designs and equipment to accommodate local traditions, geography, and materials. Every increase in offensive power was met with greater strength or cleverness by defenders. Chapter 2 looks at the castle as a fortification. Medieval warfare consisted of long sieges around a castle or town and relatively short battles in the field, rarely involving a large army of more than 20,000 men. The castle held the defensive position, and a well-built stronghold could be taken only through extended siege. In many ways, the advantage lay with the castle dwellers because the castle could be well provisioned and staffed while the assembled feudal army had to live off the land. In the hey-day of castle building, early armies consisted of a relatively undisciplined force of men who were only required to serve a limited time, usually forty days a year. Such men might be more interested in returning to their own homes than they were in pursuing their lord’s cause and maintaining a siege. Having decided to invest (lay siege to) the castle, the aggressor’s strategy would be to block off supplies and reinforcements, and then to attempt to take the castle by force, only when negotiation, treachery, or blockade and starvation failed. An assault on the castle was a slow affair because the attackers had to go over, through, or under the walls and then engage in hand-to-hand combat. To go over the wall involved the use of scaling ladders or a mobile wooden tower called a belfry. When moved into place, this tower allowed knights to climb the ramparts to the wall-walk and then engage their equals in combat. A slower, but often more effective, assault involved tunneling under the wall, causing it to collapse. Finally, to breach the walls the attackers used battering rams and stone-throwing machines, which were essentially very large catapults (see Figure 14). The most powerful engine was the trebuchet (a giant sling), which could throw huge stones with great force. None of these siege engines have survived, but a team of twenty-first-century “re-enacters” has built and tested the trebuchet and other engines with spectacular results. The mightiest castles of the eleventh and twelfth centuries were once veritable war machines, although even a well-built castle could be taken after a long siege by starvation or treachery. Castle walls and towers were defensive structures to be smashed by ever-increasing firepower. For all their imposing appearance, many castles stood for only a few years before they were destroyed and left in ruins. From the tenth through thirteenth centuries, castles functioned as military machines, but in the fourteenth and fifteenth centuries their role changed almost completely, and they were replaced by forts designed for artillery.