Spanish East Indies exception of a short period at the end of the 18th century). In 1821 the New Spanish Viceroyalty collapsed following the Mexican War of Independence, which resulted in the First Mexican Empire. All control of the Spanish East Indies government was then transferred to Madrid, until the United States annexed most Spanish territories in the Asia-Pacific region after the Spanish–American War of 1898. In 1574 the Captaincy General of the Philippines was created as a dependency of the Viceroyalty of New Spain. The Real Audiencia of Manila was created on and established in 1584 as the highest tribunal of the
Dutch East Indies Residentie Ternate to Residentie Amboina, Residentie Amboina was renamed to Residentie Molukken. In 1935 the Residentie was renamed to Gouvernement Molukken until the creation of Gouvernement Groote Oost in 1938, in which Gouvernement Molukken became residencie again. The Royal Dutch East Indies Army (KNIL) and the Royal Netherlands East Indies Army Air Force (ML-KNIL) were established in 1830 and 1915 respectively. Naval forces of the Royal Netherlands Navy were based in Surabaya, but were never part of the KNIL. The KNIL was a separate branch of the Royal Netherlands Army, commanded by the Governor-General and funded by the colonial budget.