Ponder for a moment the peculiar borders of Malaysia. It is the only country in the world, or at least the only one in its weight class (get out of here, Equitorial Guinea!) that is half continent and half island. The peninsula juts out of continental southeast Asia, while the island portion surrounds the Sultanate of Brunei and shares the rest of the island with part of Indonesia.
The initial conclusion might be that these borders are all the fault of the British Empire. The modern borders of many Africa and Asia colonized regions today have the same borders that existed during colonial times, with little correlation to the physical or ethnic geography of the region, and Southeast Asia is no exception (see a previous post on the curious long and narrow border of Thailand here). But the British Malay Colony, and the successive Federated Malay States, were only on the Malay peninsula. The eastern region of Sarawak was not part of the British colony, and has its own curious history.

The eastern part of Malaysia that is on the island of Borneo was originally all ruled by the Sultan of Brunei. In the 1840s, a British man and failed merchant by the name of James Brooke arrived in Brunei and offered to assist the Sultan keep order in an uprising that was flaring up in Sarawak, the southern portion of the realm. Brooke was successful in arranging a peaceful settlement, but the Sultan refused to pay him, and Brooke responded by threatening the rule of Brunei with his makeshift yet professional military force. The Sultan responded by granting Brooke the title of Rajah of Sarawak —and it was not long before this title grew into genuine sovereign power over the region.
Brooke proceeded to set around establishing his rule over Sarawak. He codified laws and established civil rule. He ruled as an absolute monarch with constitutional sympathies, perhaps akin in governance to the Tudor monarchy where a Parliament existed for advisory purposes only. He passed on the title to one of his nephews (he had no legitimate children and there were rumors that he was homosexual), and for a total of three generations, Brookes ruled over Sarawak as the “White Rajahs.” Thus it was that today’s “Eastern Malaysia” was run as a private colony with little if any connection to the Malay peninsula with whom it would soon be united in political unison.
Management of Sarawak is believed to have been very efficient and orderly. The rubber and oil industries boomed. The public service institutions grew stronger, complete with a penal code modeled on the British penal code, while local traditions were preserved and Christian missionaries outlawed. However, Sarawak was attacked and occupied by the Japanese in 1941, and that same year a new constitution was adopted that turned the territory into a more genuine constitutional monarchy. Vyner Brooke, the third White Rajah, evacuated his family and himself to Sydney, Australia, where he remained for the occupation of the country by Japan. (A wise course of action considering that Sarawak was probably the most obvious example of “white imperialism” over the “Asian peoples” for which Japan was nominally waging war in the Pacific.)
After World War II, the third Brooke to rule Sarawak ceded the territory to the Colonial Office of the British Empire for a sizeable pension, paid to him and his three daughters. Ironically, this was met with outrage by the inhabitants, including a majority of the native members of the Council Negri (parliament), such that the first two British governors to Sarawak were assassinated in the resulting unrest. Twenty years later, there was similar local opposition to being fedarated with Malaysia, and there was a serious push by some segments of the population to restore the monarchy. No such serious movement exists today.