The British established their garrison at Bencoolen in 1685 and in 1714 built Fort Marlborough in the city. They also established a trading post in Riau, others in the region being the Strait Settlements in Penang and Singapore, while the Dutch wrestled the port of Malacca from the Portuguese in 1641. During the Napoleonic Wars in Europe, the Kingdom of Holland and their colonies in East Indies fell to the French Republic. The British launched a military campaign against Dutch and French hold in Java and establishing British rule in Java. From 1811 to 1815, Indonesia was administrated by the British. Sir Thomas Stamford Raffles was appointed as the Lieutenant Governor of Java in 1811-1816. He was an enthusiast of Javanese culture and history that during his administration he led expeditions that discovered Borobudur, Trowulan and other archaeological sites in Java, subsequently writing "The History of Java" and publishing it in 1817.