Politically the viceroyalty was further divided into "audiencias", which were primarily superior tribunals, but which also had administrative and legislative functions. Each of these was responsible to the Viceroy of Peru in administrative matters (though not in judicial ones). Audiencias further incorporated the older, smaller divisions known as "governorships" ("gobernaciones", roughly provinces) headed by a governor. "(See, Adelantado.)" Provinces which were under military threat were grouped into captaincies general, such as the Captaincy General of Chile (established in 1541 and established as a Bourbon captaincy general in 1789), and which were joint military and political commands with a certain level of autonomy. (The viceroy was captain-general of the provinces which remained directly under his command).