Dutch Malacca was the longest period that Malacca was under foreign control. The Dutch ruled for almost 183 years with intermittent British occupation during the Napoleonic Wars . This era saw relative peace with little serious interruption from the Malay kingdoms due to the understanding earlier on forged between the Dutch and the Sultanate of Johor in 1606. This time also marked the decline of the importance of Malacca. The Dutch preferred Batavia as their economic and administrative centre in the region and their hold in Malacca was to prevent the loss of the city to other European powers and subsequently the competition that would naturally come with it. Thus in the 17th century, with Malacca ceased to be an important port, the Johor Sultanate became the dominant local power in the region, due to the opening of its ports and the alliance with the Dutch.Dutch conquest of Portuguese MalaccaIn the early 17th century, the Dutch East India Company (Verenigde Oostindische Compagnie, VOC) began the campaign to destroy Portuguese power in the East. At that time, the Portuguese had transformed Malacca into an impregnable fortress (the Fortaleza de Malaca), controlling access to the sea lanes of the Straits of Malacca and the spice trade there. The Dutch started by launching small incursions and skirmishes against the Portuguese. The first serious attempt was the siege of Malacca in 1606 by the third VOC fleet from the Dutch Republic with eleven ships, under Admiral Cornelis Matelief de Jonge that led to the naval battle of Cape Rachado. Although the Dutch were routed, the Portuguese fleet of Martim Afonso de Castro, the Viceroy of Goa, suffered heavier casualties and the battle rallied the forces of the Sultanate of Johor in an alliance with the Dutch and later on with the Acehnese.