Spanish East Indies together with the Spanish West Indies, were administered through the Viceroyalty of New Spain based in Mexico City. After Mexican independence, they were ruled directly from Madrid. As a result of the Spanish–American War in 1898, the Philippines and Guam were occupied by the United States while about 6,000 of the remaining smaller islands were sold to Germany in the German–Spanish Treaty of 1899. The few remaining islands were ceded to the United States when the Treaty of Washington was ratified in 1901. Spanish contact began on , when a Spanish expedition led by Ferdinand Magellan reached the Mariana Islands.
Spanish East Indies he should provide the most convenient to the service of God and ours and the peace and tranquility of said Province and Republic". The Spanish East Indies came to be defined as: The Spanish used several names that are not currently used. Gran Moluca (Great Molluccas) for the island of Mindanao and Nueva Castilla (New Castile) for Luzon. Because Spanish interest in the region was primarily focused on its use as a base for trade with East Asia, direct Spanish control over the area expanded slowly. The Batanes Islands were conquered in the 18th century by José Basco. The highlands