Guarda costa
Guarda costa or guardacosta ("coast guard") was the name used in the Spanish Empire for the privateers based in their overseas territories who were tasked with hunting down pirates, smugglers, and foreign privateers. Founded by the Spanish Habsburg monarchy in the 17th century, they increased their activity with the naval reforms of the succeeding Spanish Bourbon monarchy, which arranged for privateers and the Spanish Navy to work together. Commanders like Blas de Lezo helped develop this system.
They were mainly active against British, Dutch, French and Danish ships, becoming a mainstay of Spanish naval defense in the Indies and contributing to local Caribbean economies with the booty of their captures. Guarda costas earned international infamy for their perceived brutality and excesses, attacking indiscriminately foreign ships and arresting or executing crews at the slightest suspicion of crime. They were often themselves implied in local contraband and acts of piracy. Despite this, they were a notably effective and profitable privateering force, although piracy would remain endemic in the Spanish Main.