The Colonial Era: The Dutch took Malacca from the Portuguese in 1641, taking control of the spice trade. The Dutch made an agreement with the British that the Dutch would own Indonesia, while Britain would have the Malay Peninsula. However, the British did not establish formal control over the Malay Peninsula until 1867. Japan invaded the Malay Peninsula during World War II. The British returned after the war and colonial rule continued until Malaysia got her independence in 1957.