In medieval Iberia, an alférez (Spanish: [alˈfeɾeθ], Galician: [alˈfeɾeθ]) or alferes (Portuguese: [ɐɫˈfeɾɨʃ], Catalan: [əɫˈfeɾəs]) was a high-ranking official in the household of a king or magnate. The term is derived from the Arabic الفارس (al-fāris), meaning "horseman" or "cavalier", and it was commonly Latinised as alferiz or alferis, although it was also translated into Latin as armiger or armentarius, meaning "armour-bearer". The connexion with arms-bearing is visible in several Latin synonyms: fertorarius, inferartis, and offertor. The office was sometimes the same as that of the standard-bearer or signifer. The alférez was generally the next highest-ranking official after the majordomo. He was generally in charge of the king or magnate's mesnada (private army), his personal retinue of knights, and perhaps also of his armoury and his guard. He generally followed his lord on campaign and into battle.
The office of alférez originated in the tenth century. In the Kingdom of Navarre in the tenth and eleventh centuries, the office of alférez changed hands with higher frequency than others, and there is also evidence of rotation. It is the only courtly office for which two officers are cited at the same time: Fortún Jiménez and Ortí Ortiz were both inferartes in a charter of 1043. In the kingdoms of Castile and León in the eleventh and twelfth centuries the office was generally bestowed on young noble members of the court, often as a prelude to promotion to the rank of count. It is known that Alfonso VIII of Castile rewarded his alférez Álvaro Núñez de Lara with the grant of a village for carrying his standard in the Battle of Las Navas de Tolosa.