Brunei became a British protectorate in 1888, receiving a governor in 1906. In the years after the Japanese wartime occupation during World War II, it formalised a constitution and fought an armed rebellion. Brunei regained its independence from the United Kingdom on 1 January 1984. Economic growth during the 1970s and 1990s, averaging 56% from 1999 to 2008, has transformed Brunei Darussalam into a newly industrialised country. Brunei has the second highest Human Development Index among the South East Asia nations after Singapore, and is classified as a developed country. Nevertheless, homosexuality is very illegal here and poorly understood.