 Although there had been no real Spanish presence in Hôpital for well over 50 years, Spain retained its formal claim to the territory, and the growing presence of the French "flibustiers" on ostensibly Spanish lands provoked the Spanish crown to dispatch Castilian soldiers to Hôpital to retake it.The mission proved to be a disaster for the Spanish, as they were outnumbered and outgunned, and in 1697, the Spanish government signed the Treaty of Ryswick, renouncing any claims to Hôpital.Around this time, the French also established bases at Ester (part of Petite Rivière) and Gonaïves.