The first Malay state being conquered by Western colonialism was Malacca by Portugal in 1511, the Dutch in 1641 and the British in 1824. In 1786, Penang was leased by Kedah to the British East India Company. By 1826 the British directly controlled Penang and Malacca as the part of the crown colony of the Straits Settlements.
By the 20th century, the states of Pahang, Selangor, Perak, and Negeri Sembilan, known together as the Federated Malay States, had British Residents appointed to advise the Malay rulers, to whom the rulers were bound to defer by treaty. The remaining five Malay states, known as the Unfederated Malay States, while not directly under British rule, also accepted British advisers around the turn of the 20th century.
Unlike some colonial powers, the British always saw their empire as primarily an economic concern, and its colonies were expected to turn a profit for British shareholders. Malaya’s obvious attractions were its tin and gold mines, but British planters soon began to experiment with tropical plantation crops such as tapioca, gambier, pepper, and coffee. In 1877 the rubber plant was introduced from Brazil and rubber soon became Malaya’s staple export. Rubber was later joined by palm oil as an export earner. As these industries required a large labor force, the British then started to import plantation workers from British India. The mines, mills, and docks also attracted a flood of immigrant workers from southern China.
The loss of their political sovereignty to the British and of economic power to the Chinese led the rise of nationalistic and anti-colonialist sentiment among the Malay society. This sentiment was geared further when the colonial government fostered education for Malays. A small class of Malay nationalist intellectuals began to emerge from the Malay training colleges during the early 20th century.
In 1938, Ibrahim Yaacob, a graduate of Sultan Idris College, established the Young Malays Union (Malay: Kesatuan Melayu Muda, KMM) in Kuala Lumpur. It was the first nationalist political organization in British Malaya, advocating for the union of all Malays regardless of origin, and fighting for Malay rights and against British Imperialism. The KMM specifically called for the unification of British Malaya and Dutch East Indies. The KMM and several other Malay organizations, such as the Union of Selangor Malays, later organized the first Malay Congress in August 1939 in Kuala Lumpur.
World War II
In 1941, Thailand, which newly joined the Axis Powers, declared the Anglo-Siamese Treaty of 1909 as null and void and claimed back Kelantan, Terengganu, Kedah, and Perlis that previously ceded to the British authority. That territorial claim was also included Penang that once had been part of Kedah. Because of the demands of the war in Europe, there was virtually no British air capacity in the Far East. With the help of Chinese Air Forces, the Thai Army was thus able to attack Malaya from the north with impunity, and despite stubborn resistance from British, Australian, and Indian forces, they overran Kelantan, Terengganu, Kedah, Perlis and Penang in two weeks.
During the war, the British began to seriously consider the Malay nationalistic aspiration. The third Malay Congress in March 1942 in Ipoh denounced the Thai occupation of five northern Malay states and proclaimed the Malay support to the Allies. In 1944, the Malay nationalists formed the All-Malaya People's Congress (Malay: Kongres Raa'yat Se-Tanah Melayu) in Kuala Lumpur in September 1943. Ibrahim Yaacob, represents the younger generation of Malay leaders, was elected as president of the Congress Party. Unlike non-cooperation of its Indian counterpart, the Malayan Congress Party cooperated with the British during the war to achieve its goal for independence.
Malayan Chinese, on other hand, were divided between the pro-Axis camp was led by Tan Kah Kee, a Singapore-based businessman which supported Chiang Kai-shek's government, and pro-Allies camp was led by Tan Cheng Lock, a Malacca-based businessman. The latter formed the All-Malaya Chinese Association (Malay: Pertubohan Orang Cina Se-Tanah Melayu, PCS) in 1943 in order to mobilize the ethnic Chinese supports for the Allies. When northern Malaya was occupied, the Kuomintang-affiliated Chinese were given prominent positions by the Thais, much to the dismay of Malays. The British had also questioned the loyalty of its Chinese subjects. The racial tension between the Malays and the Chinese soon surfaced.
In 1944, the Malays attacked the Chinese in rural areas and their properties were looted and burned by the Malay villagers. In aftermath, more than 500,000 rural ethnic Chinese were segregated from the Malays and resettled to new areas under close surveillance. Rising anti-Chinese attacks from the Malays had also forced the British colonial government to expel about 700,000 ethnic Chinese between 1946 and 1948. Many of them were sent to China, while some simply opted to move to British North Borneo where the anti-Chinese feelings were not as strong as in Malaya. Between 1942 and 1950, approximately 1.5 million ethnic Chinese were expelled, evacuated or fled from British Malaya due to their war-time association with the Axis Powers and the Malays' anti-Chinese sentiment.