Rorigo (or Ruy) Díaz de Vivar (Vivar (Burgos) c. 1040–Valencia, 10 July 1099), known as El Cid Campeador, was a Castilian nobleman, military leader and gifted diplomat, who after being exiled, conquered and governed the city of Valencia. Rodrigo Díaz was educated in the royal court of Castile and became the alférez, or chief general, of Alfonso VI, and his most valuable asset in the fight against the Moors.