"holy brotherhood") 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 Iberian 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.
[2] With the countryside virtually everywhere effectively in the hands of nobles, such brotherhoods throughout the High Middle Ages were frequently formed by leagues of towns to protect the roads connecting them.
[2] 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.
The hermandades initially began to form in Andalusia in 1265, in towns seeking to “defend their interests” from Islamic rebels who had been taking land and proclaiming their leader king.
[3][full citation needed] The groups may have been inspired by a previously existing Islamic police force called the Shurta.
They adapted the existing form of the hermandad to the purpose of creating a general police force under the direction of officials appointed by themselves, and endowed with large powers of summary jurisdiction, even in capital cases.
[5] Just as the Hermandad's relationship with the rulers and their fellow government employees was constantly changing, so was the opinion of them held by the towns they were supposed to be guarding.