A curtain wall is a defensive, fortified wall that encloses the internal courtyard or "bailey" of a castle and connects its various towers and gatehouses. In medieval architecture, the curtain wall served as the primary line of defense against attackers once they had crossed the moat or outer ramparts. These walls were typically constructed from massive stone and mortar and were often very thick to withstand siege engines. At the top of the curtain wall, there was usually a "battlement" or "crenellation," which featured a walkway for sentries (the wall walk) and protective stone sections called "merlons" alternating with gaps called "crenels" for archers to fire through. Some curtain walls also featured "machicolations"—openings at the top that allowed defenders to drop stones or boiling liquids on anyone at the base of the wall. Famous examples, such as those at Beaumaris Castle or the Tower of London, show how multiple layers of curtain walls could be used to create a "concentric" defense system.