With the French occupation of the Netherlands (1795–1814), the Dutch king, (Stadhouder) William V, fled to Britain, where he authorized his protectors to take over all the Dutch colonies everywhere. Britain asked the East India Company to occupy the Dutch possessions in the East. The company’s occupation of Malacca in 1795 and Java itself in 1811 was at best reluctant. In 1814, by the Convention of London, Britain restored most of the colonies to William V to make Holland strong as a counterbalance to France.