The Captaincy General was a division of a viceroyalty in Spanish or Portuguese colonial administration. Captaincies general were established districts that were under threat from foreign invasion or attack from indigenous peoples. Their governors were the Captains general.
Spanish captaincies general, on account of their independence and distance from the crown, became virtual viceroyalties, having a direct relationship with the king and the Council of the Indies, in Madrid.