the governor or captain of a castellany and its castle. [...] A castellan was almost always male, but could occasionally be female,
[...]
Usually the duties of a castellan were combined with the duties of a majordomo, making 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.
text from Wikipedia, licensed under Creative Commons - Attribution - Sharealike