El Cid has set his sights over the past several years on the kingdom-city of Valencia, operating more or less independently of Alfonso while politically supporting the Banu Hud and other Muslim dynasties opposed to the Almoravids.
Around 1089-1090, El Cid, with a combined Christian and Moorish army, had begun maneuvering in order to create his own fiefdom in the Moorish Mediterranean coastal city of Valencia.
Several obstacles lie in his way.
First was Berenguer Ramón II, who rules nearby Barcelona.
In May 1090, El Cid defeats and captures Berenguer in the Battle of Tébar (nowadays Pinar de Tévar, near Monroyo, Teruel).
Berenguer will later be released and his nephew Ramón Berenguer III will marry El Cid's youngest daughter Maria to ward against future conflicts.
Along the way to Valencia, a prize also desired by the new Almoravid rulers of southern Spain, …