The viceroyalty was a local, political, social, and administrative institution, created by the Spanish monarchy in the 15th century, for ruling in its territorial overseas territories.
The administration over the vast territories of the Spanish Empire was carried out by viceroys, who became governors of an area, which was considered not as a colony but as a province of the empire, with the same rights as any other province in Peninsular Spain.
The Spanish Americas had four viceroyalties:Viceroyalty of the Río de la Plata
Viceroyalty of New Granada
Viceroyalty of New Spain
Viceroyalty of Peru