Administratively, the Spanish East Indies was part of the Captaincy General of the Philippines and the Real Audiencia of Manila. Cebu was the first seat of government, later transferred to Manila. From 1565 to 1821 these territories, together with the Spanish West Indies, were administered through the Viceroyalty of New Spain based in Mexico City.