El Cid’s military talents were recognized at an early age even before he was exiled. He fought in many battles working for king Alfonso of Spain, especially against the Moorish Muslim Dynasty, the Almoravids, who were ruled by King Mu’Tamin of Zaragoza. As soon as El Cid’s military talent was recognized by King Alfonso of Spain, Alfonso decided he wanted El Cid to be an official military general of Spain. El Cid’s first battle was the Battle of Graus in 1063 against the Almoravids. He was just nineteen years old at the time. Rodrigo learned much during this battle, and recognized his own abilities in the military, which gave him confidence for battles later to come. He kept fighting to defend Spain, and was very successful in doing so. He never lost a battle while fighting for the Castilians before his exile. In almost every battle he fought in before his exile, El Cid had a major role in them. He mainly acted as a general and lead his troops to many victories. Later, El Cid was exiled from Spain, but never gave up hope in eventually returning later in his life.