The cowardly conduct of the Counts of Carrion roused the anger of the Cid's followers, and in the siege of Valencia that followed their conduct brought only contempt. When the Moors were finally driven away the counts asked permission to return home with their brides and gifts.
So the Cid parted from his daughters, weeping at the loss. The procession started. The first morning the counts sent their escorts ahead, and, left alone with their wives, stripped them of their garments, beat them and kicked them, and left them for dead. But Felez Muñoz, a loyal follower of the Cid's, riding back, found the two wives, bound up their wounds and obtained shelter for them in the house of a poor man whose wife and daughters promised to nurse them. Then he rode on to tell the Cid. The Cid swore that he would be avenged, and as Alfonso was responsible for the marriage, he applied to him for redress.
The king, who had long since forgiven the Cid and learned to value his services, was very angry. A battle was finally arranged. The Counts of Carrion and their uncle were defeated and banished, and the Cid returned in triumph to Valencia. Here his daughters' second marriage took place.
The Moors returned five years later, and the Cid was prepared to meet them when he received a vision of St. Peter, predicting that he would die within thirty days, but that even though dead he would triumph over his enemy. He accordingly made preparations for his death, and after appointing a successor, he gave instructions that none should weep over his death, and that his body when embalmed should be set upon his horse, Babieça, and that, with his sword Tizona in his hand, he should be led on a certain day against the enemy.
The hero died and his successor together with his wife Ximena strove to carry out his instructions. A battle was planned, and the Cid, strapped upon his war horse, rode in the van. The Moors, filled with terror, fled before him.
After the victory the body was placed in the Church of San Pedro de Cardeña, where for ten years it remained seated, in plain view of all.