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
East Indies theatre of the French Revolutionary Wars to Macau. After seeing his charges into harbour in December, Captain Edward Cooke investigated Manila himself in "Sybille", accompanied by "Fox". There he discovered the weak state of the Spanish squadron. Other British ships were operating in the East Indies: in July 1797, "Resistance" and a force of EIC troops captured Kupang on Timor but were subsequently driven off by an armed uprising by the Malay citizens of the town. In the street fighting 13 British troops and 300 Malays were killed. "Resistance" was subsequently lost on 24 July 1798, accidentally destroyed with more than 300 of its crew in