Santa Hermandad, literally "holy brotherhood" in Spanish, was a type of military peacekeeping association of armed individuals, which became characteristic of municipal life in medieval Spain, especially in Castile. Modern hermandades in Spain, some of which evolved from medieval origins, are now for the most part religious confraternities retaining only a military structure and ethos.
As medieval kings of León, Castile, and Aragon were often unable to maintain public peace, protective municipal leagues began to emerge in the twelfth century against bandits and other rural criminals, as well as against the lawless nobility or mobilized to support a claimant to the crown. These organizations were individually temporary, but became a long-standing fixture of Spain. The first recorded case of the formation of an hermandad occurred when the towns and the peasantry of the north united to police the pilgrim road to Santiago de Compostela in Galicia, and protect the pilgrims, a major source of regional income, against robber knights. With the countryside virtually everywhere effectively in the hands of nobles, throughout the High Middle Ages such brotherhoods were frequently formed by leagues of towns to protect the roads connecting them. The hermandades were occasionally co-opted for dynastic purposes. They acted to some extent like the Fehmic courts of Germany. Among the most powerful was the league of northern Castilian and Basque ports, the Hermandad de las Marismas: Santander, Laredo, Castro Urdiales, Bermeo, Guetaria, San Sebastian, Fuenterrabia and Vitoria.