In 1620, the English and Dutch East India Companies entered into an unlikely alliance of convenience. Historically, they had fought each other like cat and mouse for influence in the lucrative Spice Islands. In fact they were actually fighting over the Banda Islands at the time that their share holders were negotiating the alliance. The shareholders felt that it was wise to share the costs of materials and stop undercutting each other in purchasing throughout Asia. One consequence was that the English moved their base of operations from Bantam to the Dutch settlement at Batavia.
Unfortunately for the shareholders, their men on the ground found it difficult to cooperate with each other. They did not trust those who had been their deadly adversaries. In fact things came to a head in Amboina when the Dutch commander tortured and executed nine East India Company men and nine Japanese samurai mercenaries. This outrage tested the alliance of convenience to breaking point. In fact, it caused a diplomatic furore back in Europe and was evidence to both sets of shareholders that their personnel were unwilling to put the spirit of the agreement into force.
The English sought alternative bases from Batavia. They tried setting up in Lagundy in the Straits of Sunda in 1624 but disease was to thwart this attempt. In the end, they moved back to Bantam.
Batavia was to be the headquarters for the Dutch East India Company for the next two centuries and the Administrative centre for the Dutch colony even after the demise of the company. However, the British would return in 1811 as part of the Napoleonic wars. The Dutch were unable to resist Napoleon's influence and so the Royal Navy was at liberty to pick up virtually all Dutch colonies throughout the world. Batavia was no exception and would be administered by the energetic Thomas Stamford Bingley Raffles. He was on the lookout at this time for a new centre of operations for the British and so used the time to assess the viability of number of colonies for coordinating trade. He would finally settle for Singapore as it seemed to offer a better route to China which was becoming a more and more important trading partner whose products of tea, silk and China were replacing the staples of the Spice Islands. History would show that Raffles was correct to abandon Batavia in favour of Singapore and so the British were happy to hand back the colony to the Dutch in 1816.