Before the Spaniards, the Portuguese launched a failed expedition to capture the city in July 1501. Four years later, the Spanish took Mers-el-Kébir, located just west of Oran. Thus began the first organized incursions against the city which, at the time, numbered 25,000 inhabitants and counted 6,000 "fueros." Count Pedro Navarro, on the orders of Cardinal Francisco Jiménez de Cisneros, finally captured the city on May 17, 1509. The occupying forces set fire to the books and archives of the town.