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.
Dutch East Indies they moved south in late 1941 in search of Dutch oil. On 10 January 1942, during the Dutch East Indies Campaign, Japanese forces invaded the Dutch East Indies as part of the Pacific War. The rubber plantations and oil fields of the Dutch East Indies were considered crucial for the Japanese war effort. Allied forces were quickly overwhelmed by the Japanese and on 8 March 1942 the Royal Dutch East Indies Army surrendered in Java. Fuelled by the Japanese "Light of Asia" war propaganda and the Indonesian National Awakening, a vast majority of the indigenous Dutch East Indies population first