Sarawak is one of two Malaysian states on the island of Borneo. Known as Bumi Kenyalang ("Land of the Hornbills"), Sarawak is situated on the northwest of the island, bordering the Malaysian state of Sabah to the northeast, Indonesia to the south, and surrounding Brunei. It is the largest Malaysian state.
The eastern seaboard of Borneo was charted, though not settled, by the Portuguese in the early 16th century. The area of Sarawak was known to Portuguese cartographers as Cerava. During the 17th century, Sarawak was self-governed under Sultan Tengah. By the early 19th century, Sarawak had become a loosely governed territory under the control of the Brunei Sultanate. During the reign of Pangeran Indera Mahkota in 19th century, Sarawak was facing chaos. Sultan Omar Ali Saifuddin II (1827–1852), the Sultan of Brunei, ordered Pangeran Muda Hashim in 1839 to restore order and it was during this time that James Brooke arrived in Sarawak.
Pangeran Muda Hashim initially requested assistance in the matter, but Brooke refused. In 1841, Brooke paid another visit to Sarawak and this time he agreed to provide assistance. Pangeran Muda Hashim signed a treaty in 1841 surrendering Sarawak and Sinian to Brooke. On 24 September 1841, Pangeran Muda Hashim bestowed the title Governor to James Brooke. He effectively became the Rajah of Sarawak and founded the White Rajah Dynasty of Sarawak, later extending his administration through an agreement with the Sultan of Brunei. Sarawak was thus an independent kingdom from 1841 until 1888, when the state was placed under British protection.