Declining trade and colonial intrusions eroded the size and influence of Brunei, especially after the 1839 arrival of James Brooke.
James Brooks was appointed governor, or Rajah of Sarawak,after helping the Sultan put down a rebellion.However, he soon consolidated power and started expanding the territory under British control,creating his own dynasty of "White Rajahs" that ruled until world war ll.