East Indies theatre of the French Revolutionary Wars situation in Europe had however shifted once more during 1796 when France and Spain signed the Treaty of San Ildefonso, transferring Spain from an ally of Britain to an ally of France. British attention in the East Indies therefore shifted from the French island territories to the Spanish Philippines, where the defence squadron had been badly damaged in a hurricane in April 1797 and was in dock for extensive repairs. British forces were once again in the ascendant, Rainier commanding five ships of the line, one fourth rate ship and six frigates. Extensive plans were developed by Rainier in conjunction
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