El Cid married the cousin of King Alfonso VI, Doña Ximena, but for certain reasons (according to the story, he made the king swear by Santa Gadea that he had not ordered the fratricide of his own brother), he fell into the disfavor of the king and had to leave his home country of Castile.