Spanish Filipino territories, together with the Spanish West Indies, were administered through the Viceroyalty of New Spain based in Mexico City. The Captaincy General of the Philippines (; ) was an administrative district of the Spanish Empire. The Captaincy General encompassed the Spanish East Indies which included the modern country of the Philippines and various Pacific Island possessions, such as the Caroline Islands and Guam. It was founded in 1565 with the first permanent Spanish settlements. For centuries all the political and economic aspects of the Captaincy were administered in Mexico by the Viceroyalty of New Spain, while the administrative issues had
Dutch East Indies East Indies. In 1811 Daendels was replaced by Governor-General Jan Willem Janssens, but shortly after his arrival British forces occupied several Dutch East Indies ports including Java, and Thomas Stamford Raffles became Lieutenant Governor. Following Napoleon's defeat at the 1815 Battle of Waterloo and the Congress of Vienna, independent Dutch control was restored in 1816. Under the 1824 Anglo-Dutch Treaty, the Dutch secured British settlements such as Bengkulu in Sumatra, in exchange for ceding control of their possessions in the Malay Peninsula (Malaya) and Dutch India. The resulting borders between former British and Dutch possessions remain today between modern Malaysia