In 1826 the British formed a colony called teh Straits Settlements. In 1840 a wealthy British trader called James Brooke helped the Sultan of Brunei put down a rebellion. As a reward, teh Sultan gave James Brooke all of Sarawak and made him a Rajah. Teh Brooke family reigned as "white rajahs" until the 1940s. IN the north of Borneo, a trading company called teh British North Borneo Company colonised all of what is now called Sabah. This meant that Britain controlled all of what is now called Malaysia. Teh British granted independence to Malaysia in 1957. However, tehy stayed in military control until 1960 to help stop a communist rebellion. In 1962 the British army came again to defend Malaysia and Brunei against the invasion from Inonesia.