From a young age Alfonso X showed an interest in military life and chivalry. In 1231 Alfonso traveled with Pérez de Castron on a military campaign in lower Andalusia. Writing in "Estoria de España", Alfonso describes having seen St. James on a white horse with a white banner and a legion of knights fighting a war above the soldiers of Spain. This vision of a heavenly army fighting in Jerez and participation in military campaigns likely left Alfonso X with a high degree of knowledge and respect for military operations and chivalric knights. Alfonso's respect for chivalry can also be seen in his writing of Spanish law. Spanish Chivalric conduct was codified in the "Siete Partidas" (2,21) where he wrote that knights should be, "of good linage and distinguished by gentility, wisdom, understanding, loyalty, courage, moderation, justice, prowess, and the practical knowledge necessary to assess the quality of horse and arms ("Siete Partidas", 21,1–10)." These efforts to make a codified standard of chivalric conduct were likely meant to both encourage strength of arms (prowess) and to restrain the use of violence for only just (state-sponsored) usage.