During the 19th century, the Bruneian Empire began to decline. The Sultanate ceded Sarawak (Kuching) to James Brooke and installed him as the White Rajah, and it ceded Sabah to the British North Borneo Chartered Company. In 1888, Brunei became a British protectorate and was assigned a British resident as colonial manager in 1906. After the Japanese occupation during World War II, in 1959 a new constitution was written. In 1962, a small armed rebellion against the monarchy was ended with the help of the British.[10]
Brunei gained its independence from the United Kingdom on 1 January 1984. Economic growth during the 1990s and 2000s, averaging 56% from 1999 to 2008, transformed Brunei into an industrialised country. It has developed wealth from extensive petroleum and natural gas fields. Brunei has the second-highest Human Development Index among the Southeast Asia nations, after Singapore, and is classified as a "developed country".[11] According to the International Monetary Fund (IMF), Brunei is ranked fifth in the world by gross domestic product per capita at purchasing power parity. The IMF estimated, in 2011, that Brunei was one of two countries (the other being Libya) with a public debt at 0% of the national GDP. Forbes also ranks Brunei as the fifth-richest nation out of 182, based on its petroleum and natural gas fields.