|Raja Muda Hashim sought the backing of Brookes and his schooner the 'Royalist' in the constant warfare against pirates and Dyaks along the coastline of Sarawak. Brooke energetically set about helping quell the disturbances. Raja Muda Hashim was concerned that Brookes might be a transient adventurer who might pass on and never be seen again. He therefore made him an offer of land and a title as the governor of Sarawak if the remained with his ship, expertise and continued support.
Raja Muda Hashim seemed to have had second thoughts about his ability to confer titles as he was only the heir to the throne himself. Brooke continued to campaign on his behalf and returned to Kuching with his ship in sight of Hashim's palace. On request of an audience, Brooke asked for confirmation of his title and gave the distinct impression that he could seize the entire kingdom for himself if he was so disposed to do so. Brooke had the title confirmed in 1841. The Sultan also agreed to the title in return for an annual tribute and a promise to respect the laws and religions of the country.
Brooke, with the aid of the Royal Navy, continued to campaign against pirates and Dyaks operating out of the archipelago. However, a jealous adopted son of the Sultan of Brunei conspired to kill Raja Muda Hashim and his other brothers in order to clear a route to accession for himself. A slaughter occurred when many of the princes were killed in their sleep although one of Hashim's brothers blew himself up in an an attempt to foil the assassins. Hashim was himself wounded but was later recaptured but managed to shoot himself before he was killed. This event saw Brooke request a flotilla of the China Squadron to come to Brunei Bay and reassert control.
The Sultan apologised and confirmed Brooke's title without tribute and furthermore awarded him Labuan also.