From FamilySearch Wiki
The Viceroyalty of New Spain (Spanish: Virreinato de Nueva España), was the political unit of Spanish territories in North America and Asia-Pacific. The territory included the present-day Southwestern United States, Mexico, Central America (except Panama), the Caribbean, and the Philippines. It was ruled by a viceroy from Mexico City who governed on behalf of the King of Spain. The Viceroyalty of New Spain lasted from 1535 to 1821.