At around 100 BC, sailors from India reached Malaysia in the search of a place called Savarnadvipa-the Land of Gold. From that point onwards an ever-growing stream of Indian traders arrived in search of gold, aromatic wood, and spices. Indian migration introduced Hinduism, Buddhism, and other elements of Indian culture in Malaysia. Local kings, who sent emissaries to the Indian subcontinent, were impressed by the efficiency of the Hindu courts, and soon began to refer to themselves as "rajahs." They integrated what they considered the best Indian governmental traditions with the existing structure. Today, the most conspicuous example of the early Indian influence is in the Malay wedding ceremony, which is very similar that of the subcontinent.
Until the 15th century, neighboring kingdoms in Cambodia and Indonesia largely overshadowed the Hindu kingdoms of peninsular Malaysia. The strongest of these kingdoms was called Srivijaya and it was lauded as the best trading port in the region. It was the first great maritime kingdom in the Malay Archipelago, and other ports quickly emulated its success. At some time around the 13th century, as other entrepots emerged, Srivijaya's influence declined. The lack of a strong central power, coupled with the ever-present nuisance of pirates, amplified the need for secure, well-equipped port in the region. This need gave rise to the city of Malacca.
Malacca was founded in 1400 by a fleeing Palembang prince named Parameswara. Its rise from a village of royal refugees to a wealthy kingdom was swift. Perfectly located for trade, within 50 years it was the most influential port and trading center in Southeast Asia. With these traders came Islam, and Malacca's rulers now referred to themselves as "sultans." Malacca established a kind of regional "navy" that policed the local waters and escorted friendly vessels. With the success and power it enjoyed, Malacca came to control the entire west coast of the Malay Peninsula, the kingdom of Pahang, and much of Sumatra.
In 1511, a Portuguese fleet led by Alfonso de Albuquerque sailed into Malacca's harbor and captured the city. The Portuguese constructed a massive fort in Malacca-A Famosa-which the Dutch captured in 1641. This gave the Dutch an almost exclusive control over the spice trade until 1785, when the British East India Company convinced the Sultan of Kedah to allow them to build a fort on the island of Penang. While the European powers fought among themselves, the local Malay sultanates continued with their own affairs. After Malacca was captured, Johor and later on Perak became the new Muslim trading centers.
In the late 1860's, a number of Malay kingdoms began fighting each other for control of the throne of Perak, causing enough of a disturbance in the region to inspire Britain to intervene and essentially force the Malay rulers to sign a peace treaty known as the Pangkor Agreement in 1874. The treaty gave Britain a much greater role in the region and monopoly on the vast amount of tin being mined in the peninsula.
Britain ruled over what was then called Malaya until the Japanese invaded and ousted them in 1942. During this time, large numbers of Chinese fled to the jungle and established an armed resistance, which, after war's end, would become the basis for an infamous communist insurgency. In 1945, when World War II ended, Britain resumed control again, but Malaya's independence movement had matured and organized itself in an alliance under Tunku Abdul Rahman. Malaya finally achieved independence in 1957 and Tunku became the first prime minister of Malaya. The British colonies of Singapore, Sarawak, and Sabah (called North Borneo) joined the Federation to form Malaysia on September 16, 1963. Singapore withdrew from the Federation on August 9, 1965, and became an independent republic.