Today, owning a home near the Castellón coast is a privilege, but four centuries ago, living or working near the sea was a risky activity that could cost freedom or life. Barbary piracy profoundly conditioned the province from the early 16th century, when the Ottoman and Spanish empires clashed in the Mediterranean.
The Castellón coast was a weak point where the Ottomans could carry out incursions to weaken the local economy and profit from the slave trade. It is estimated that between the 16th and 19th centuries, around 1.5 million people were affected by this trade in the Mediterranean.
Towns such as Orpesa, Vinaròs, and Almenara suffered fierce assaults. One of the most virulent was in Orpesa on June 7, 1534, when Hayreddin Barbarossa landed near the castle, plundering the town and capturing residents from Vila-real and Castellón. Two years later, in 1536, the corsair Caramani would again assault Orpesa, which was a recurring target.
Being captured in these assaults meant an uncertain fate. Captives were transported to Algiers or other slave markets in North Africa. Some could hope for a ransom, processed by Mercedarian friars, while others ended up chained to galley oars or in arduous trades, with the option of converting to Islam to improve their conditions.
This situation conditioned the urban development of the Castellón coast for centuries. Many towns did not develop maritime districts until well into the 18th century, and those that did, such as Benicàssim or Peñíscola, did so under the protection of fortifications. Philip II decided to fortify the entire coast, sending the military engineer Juan Bautista Antonelli to the province in 1563 to devise a system of watchtowers.
This defensive system, along with victories such as the siege of Malta in 1565 and Lepanto in 1571, undermined the Ottoman push in the Western Mediterranean. However, the threat persisted until the late 18th century, when the Dey of Algiers signed a treaty with Spain in 1786, and finally ended with the French conquest of Algiers in 1830.




