A castellan was the governor or captain of a castellany and its castle. The word stems from the Latin Castellanus, derived from castellum "castle". Sometimes also known as a constable, governor of the castle district or captain, the Constable of the Tower of London is, in fact, a form of castellan. A castellan was almost always male, but could occasionally be female, as when, in 1194, Beatrice inherited her father's castellany of Bourbourg upon the death of her brother, Roger.
After the fall of the Western Roman Empire, many tribes migrated into western Europe, causing strife and war. The answer to recurrent invasion was to create fortified areas which evolved into castles. Some leaders gained control of several areas, each with a castle. The problem lay in exerting proper control and authority in each area when a leader could only be in one place at a time. To answer this, lords gave their trusted vassals direct control of a castle, reporting to the lord only. In the ninth century, as fortifications improved and kings had difficulty making their subordinates pay their taxes or send the military aid the kings demanded, the castellans grew in power, holding their fief without much concern for their overlord's demands. This changed as kings grew in power and as the Holy Roman emperors replaced recalcitrant vassals with ministerials.
Usually the duties of a castellan were combined with the duties of a majordomo. This made the castellan responsible for a castle's domestic staff and its garrison, as well as a military administrator responsible for maintaining defenses and protecting the castle's lands. This was particularly the case if there was no lord resident at the castle, or if the resident lord was frequently absent. A castellan may exercise the power of the "ban" - that is, to hear court cases and collect the fines, collect taxes from residents, and muster local men for the defense Castellans had both the power of low justice and high justice, which allowed them to implement up to and including the death penalty, as when, in 1111, the Salzburg castellan caught the ministerial who fomented armed rebellion, he had the offender blinded, as one would a serf. At times, the castellan served as the representative of the people of his castellany, as did the castellan of Bruges, when the burghers stood up for more privileges and liberties from the counts of Flanders.