Guarda costa
Guarda costa or guardacosta ("coast guard") was the name used in the Spanish Empire for the privateers based off their overseas territories, tasked with hunting down piracy, contraband and foreign privateering. Founded under the House of Habsburg in the 17th century, they increased their activity with the naval reforms of the House of Bourbon, 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 economy with 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 force of privateering, even although piracy would remain endemic in the Spanish Main.