Dutch Malacca
Dutch Malacca (1641–1825) 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 (1795–1818). This era saw relative peace with little serious interruption from the Malay sultanates 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 (present day Jakarta) 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 Malacca. In the early 17th century, the Dutch East India Company () 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. The Dutch with their local allies assaulted and wrested Malacca from the Portuguese in January 1641. This combined Dutch-Johor effort effectively destroyed the last bastion of Portuguese power, removing their influence in the Malay archipelago. As per the agreement with Johor in 1606, the Dutch took control of Malacca and agreed not to seek territories or wage war with the Malay kingdoms. Administration of Malacca. Malacca was controlled as a colony of the VOC. All the chief administrators of Malacca were Dutch governors except for the brief period that the city was under British Residents during the  Napoleonic Wars. The governors and residents list is as follows: The Town and Fortress of Malacca. The Dutch improved and expanded the Portuguese fortress and built walls to protect the harbour and expanded city. During their rule the famous city hall or Stadthuys was also constructed, which still stands today.