In 1469, the heir to Sardinia, Ferdinand II of Aragon, married Isabel of Castile, and the "Kingdom of Sardinia" (which was separated from Corsica) was to be inherited by their Habsburg grandson, Charles I of Spain, with the state symbol of the Four Moors. The successors of Charles I of Spain, in order to defend their Mediterranean territories from raids of the Barbary pirates, fortified the Sardinian shores with a system of coastal lookout towers, allowing the gradual resettlement of some coastal areas.