The castle keep (also known as a "donjon") was the innermost, strongest, and most heavily fortified tower or building within a medieval castle complex. In the 11th to 13th centuries, the keep served as the primary residence for the lord or monarch and their immediate household, acting as a self-contained fortress within the larger walls. Its purpose was multi-functional: primarily, it was the last line of defense during a siege. If the outer walls (the "bailey") were breached, the inhabitants would retreat to the keep, which was designed with thick stone walls, narrow windows for archers, and often a single, elevated entrance reachable only by a removable wooden staircase. Beyond military defense, the keep was a symbol of power and status, looming over the surrounding landscape to intimidate local populations and rival lords. Internally, it housed the "Great Hall" for feasts and judicial proceedings, as well as storage for food and arms in the lower levels or dungeons. As siege technology evolved, keeps became more ornate and comfortable, eventually transitioning from purely military bastions into the sophisticated palaces and stately homes seen in the late medieval and Renaissance periods.