The Castilian nobleman Rodrigo Diaz de Vivar, known as El Cid, who was intent on possessing his own principality on the Mediterranean, entered the province in command of a combined Christian and Moorish army and besieged the city beginning in 1092.