rulers, to whom the rulers were bound to defer by treaty. The remaining five states in the peninsula, known as the Unfederated Malay States, while not directly under British rule, also accepted British advisers around the turn of the 20th century. Development on the Peninsula and Borneo were generally separate until the 19th century. Under British rule the immigration of Chinese and Indians to serve as labourers was encouraged. Sabah was governed as the crown colony of British North Borneo after it was leased from the Sultanate of Sulu in 1878. In 1842, Sarawak was ceded by the Sultan of Brunei to James Brooke, whose successors ruled as the White Rajahs over an independent kingdom until 1946, when it became a Crown colony.
In the Second World War the Japanese army invaded and occupied Malaya, Sabah, Sarawak, and Singapore for over three years. During this time, ethnic tensions were raised and nationalism grew. Popular support for independence increased after Malaya was reconquered by Allied Forces. Post-war British plans to unite the administration of Malaya under a single crown colony called the Malayan Union met with strong opposition from the Malays, who opposed the weakening of the Malay rulers and the granting of citizenship to the ethnic Chinese. The Malayan Union, established in 1946 and consisting of all the British possessions in the Malay Peninsula with the exception of Singapore, was quickly dissolved and replaced by the Federation of Malaya, which restored the autonomy of the rulers of the Malay states under British protection. During this time, mostly Chinese rebels under the leadership of the Malayan Communist Party launched guerrilla operations designed to force the British out of Malaya. The Malayan Emergency lasted from 1948 to 1960, and involved a long anti-insurgency campaign by Commonwealth troops in Malaya. After this a plan was put in place to federate Malaya with the British crown colonies of Sabah, Sarawak, and Singapore. The proposed