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 campaign soldiers provided assistance to Indonesian Republican forces during the Indonesian National Revolution. Dutch East Indies campaign The Dutch East Indies Campaign of 1941–42 was the conquest of the Dutch East Indies (present-day Indonesia) by forces from the Empire of Japan in the early days of the Pacific Campaign of World War II. Forces from the Allies attempted unsuccessfully to defend the islands. The East Indies were targeted by the Japanese for their rich oil resources which would become a vital asset during the war. The campaign and subsequent three and a half year Japanese occupation was also a major factor