In exchange for helping the regent end a revolt of uppity Malay chiefs, Brooke was made Rajah of Sarawak in 1841, with his capital in Kuching (founded by the Malays just 11 years earlier).
The regent always rewarded those who helped him.