Perceiving he was no longer in favor at court, the Cid haughtily withdrew, and, when Alfonso came down into Valencia, demanding that the cities which had hitherto paid tribute to his subject should now do so to him, the Cid retaliated by invading Alfonso's realm. None of the courtiers daring to oppose him, Alfonso had cause bitterly to repent of what he had done, and humbly assured his powerful subject he would never molest him again. Ever ready to forgive an ungrateful master, the Cid withdrew, and for a time king and subject lived in peace.
Although the Cid had permitted the Moors to remain in the cities he had conquered, they proved rather restive under the Christian yoke, and guided by Abeniaf finally told the Moors in Northern Africa that if they would only cross the sea they would deliver Valencia into their hands. But this conspiracy soon became known to the Moors who favored the Cid, and they immediately notified him, holding their town which was in dire peril for twelve days.
To keep his promise, Abeniaf finally hauled some of the Moors up over the walls by means of ropes, and the presence of these foes in their midst compelled the Moors who favored the Cid to leave the city in disguise, thus allowing Abeniaf and his allies to plunder right and left and even to murder the Moorish king. This done, Abeniaf himself assumed the regal authority, and began to govern the city in such an arbitrary way that he soon managed to offend even his own friends.
Meantime the Moors who had fled rejoined the Cid, and, when they reported what had occurred, Rodrigo wrote to Abeniaf, reproaching him for his treachery and demanding the surrender of the property he had left in town. Because Abeniaf replied that his allies had taken possession of it, the Cid termed him a traitor and swore he would secure revenge. Thereupon our hero set out with an army, and, finding himself unable to take the city by assault, began to besiege it, pulling down the houses in the suburbs to secure necessary materials to construct his camp. Then he began a systematic attack on the city, mastering one of its defences after another, and carrying on the siege with such vigor that he thereby won additional glory. All the Moorish captives taken were sent out through his lines into the open country, where they were invited to pursue their agricultural avocations, and assured protection, provided they would pay tribute of one-tenth of the produce of their lands.
Meantime the people in the besieged city suffered so sorely from hunger, that they finally sent word they would treat with the Cid if he would allow Abeniaf and his followers to leave the country unharmed. The Cid having consented to this proposal, the invading Moors withdrew to Morocco, whence, however, they soon returned in increased numbers to recapture Valencia and take their revenge upon Abeniaf, who had proved treacherous to them too. To check the advance of this foe, the Cid flooded the country by opening the sluices in the irrigation canals, and the invaders, fancying themselves in danger of drowning, beat a hasty retreat. Because Abeniaf took advantage of these circumstances to turn traitor again, the Cid besieged him in Valencia for nine months, during which the famine became so intense that the inhabitants resorted to all manner of expedients to satisfy their hunger.
Throughout this campaign the Cid ate his meals in public, sitting by himself at a high table and assigning the one next him to the warriors who won the most distinction in battle. This table was headed by Alvar Fanez, surrounded by the most famous knights. A notorious coward, pretending to have done great deeds, advanced one day to claim a seat among the heroes. Perceiving his intention, the Cid called him to come and sit with him, whereupon the knight became so elated that when he again found himself on the field of battle he actually did wonders! Seeing his efforts, the Cid generously encouraged him and, after he had shown himself brave indeed, publicly bade him sit with the distinguished knights.
The city of Valencia having finally opened its gates, the Cid marched in with a train of provision-wagons, for he longed to relieve the starving. Then, sending for the principal magistrates, he expressed commiseration for their sufferings, adding that he would treat the people fairly, provided they proved loyal in their turn. But, instead of occupying the city itself, he and the Christians returned to the suburbs, enjoining upon the Moorish governor to maintain order among his people, and slay none but Abeniaf, who had proved traitor to all.
Soon after, seeing that the Moors and Christians would never be able to live in peace within the same enclosure, the Cid appointed another place of abode for the Moors. Then he and his followers marched into Valencia, which they proceeded to hold, in spite of sundry attempts on the part of the Moors to recover possession of so important a stronghold.
When the Moorish king of Seville ventured to attack the Cid, he and his thirty thousand men experienced defeat and many of his force were drowned in the river while trying to escape. Such was the amount of spoil obtained in this and other battles, that the Cid was able to make his soldiers rich beyond their dreams, although by this time he had a very large force, for new recruits constantly joined him during his wars with the Moors.
As the Cid had vowed on leaving home never to cut his beard until recalled, he was now a most venerable-looking man, with a beard of such length that it had to be bound out of his way by silken cords whenever he wanted to fight. Among those who now fought in the Cid's ranks was Hieronymo (Jerome), who became bishop of Valencia, and who, in his anxiety to restore the whole land to Christian rule, fought by the Cid's side, and invariably advised him to transform all captured mosques into Christian churches.
Now that he had a fixed abiding place, the Cid bade Alvar Fanez and Martin Antolinez carry a rich present to Don Alfonso, and obtain his permission to bring his wife and daughters to Valencia. The same messengers were also laden with a reward for the Abbot of St. Pedro, under whose protection the Cid's family had taken refuge, and with funds to redeem the chests of sand from the Jews at Burgos, begging their pardon for the deception practised upon them and allowing them higher interest than they could ever have claimed. Not only did the messengers gallantly acquit themselves of this embassy, but boasted everywhere of the five pitched battles the Cid had won and of the eight towns now under his sway.
On learning that the Cid had conquered Valencia, Alfonso expressed keen delight, although his jealous courtiers did not hesitate to murmur they could have done as well! The monarch also granted permission to Donna Ximena and her daughters to join the Cid, and the three ladies set out with their escorts for Valencia. Nine miles outside this city, the Cid met them, mounted on his steed Bavieca, which he had won from the Moors, and, joyfully embracing wife and daughters, welcomed them to Valencia, where from the top of the Alcazar he bade them view the fertile country which paid tribute to him.
But, three months after the ladies' arrival, fifty thousand Moors crossed over from Africa to recover their lost territory. Hearing this, the Cid immediately laid in a stock of provisions, renewed his supplies of ammunition, and inspected the walls and engines of his towns to make sure they could resist. These preparations concluded, he told his wife and daughters they should now see with their own eyes how well he could fight! Soon after the Moors began besieging the city (1102), the Cid arranged that some of his troops should slip out and attack them from behind while he faced them. By this stratagem the Moors were caught between opposing forces, and overestimating their numbers fled in terror, allowing the Cid to triumph once more, although he had only four thousand men to oppose to their fifty thousand! Thanks to this panic of the Moors the Cid collected such huge quantities of booty, that he was able to send a hundred fully equipped horses to King Alfonso, as well as the tent which he had captured from the Moorish monarch. These gifts not only pleased Alfonso, but awed and silenced the courtiers, among whom were the Infantes of Carrion, who deemed it might be well to sue for the Cid's daughters, since the father was able to bestow such rich gifts. Having reached this decision, these scheming youths approached the king, who, counting upon his vassals' implicit obedience to his commands, promised they should marry as they wished.