The Old Town is surrounded by massive fortress walls pierced by two ancient gates: the Islamic Puerta de Almocábar, which in the 13th century was the main gateway to the castle; and the 16th-century Puerta de Carlos V. Inside, the Islamic layout remains intact, and its maze of narrow streets now takes its character from the Renaissance mansions of powerful families whose predecessors accompanied Fernando el Católico in the taking of the city in 1485.