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
French and British interregnum in the Dutch East Indies in Malaccan strait, the island of Singapore and Penang. As the British coveted the Dutch colonies in the region, the French-controlled East Indies was bracing for the predicted incoming British invasion. In 1806, King Lodewijk Napoleon of the Netherlands sent one of his general, Herman Willem Daendels, serving as governor-general of East Indies based in Java. Daendels was sent to strengthen Javanese defences against a perceived incoming British invasion. He arrived in the city of Batavia (now Jakarta) on 5 January 1808 and relieved the former Governor General, Albertus Wiese. He raised new forces, built new roads within Java, and