After capturing the city, Spanish forces destroyed many of its buildings and killed or enslaved much of the population. In 1524,[citation needed] Spain gave Tripoli to the Knights of St. John, who lost it in 1551 to Ottoman captain Turgut Reis.