Don Alonso Pérez de Guzmán (1256-1309), surnamed El Bueno, the good, in the sense of good at need, or stout-hearted, was the founder of the line which the dukes of Medina Sidonia belonged to. In 1296 he defended the town of Tarifa on behalf of Sancho IV de León y Castilla. Guzmán had been given charge of Tarifa, recently captured from the Moors, despite having fought for Alfonso X against the rebellion of his son Sancho IV.