A native sultanate was established at Brunei in the 15th cent. At one time the sultan controlled nearly all of Borneo, but by the 19th cent. his power had declined and Brunei had become a haven for pirates. In 1888 the British established a protectorate over Brunei, administered by a British resident, although the sultan retained formal authority. The Japanese overran the area during World War II.
In 1959 a written constitution went into effect. Under it, the sultanate remained and the protectorate was governed by a chief minister, council of ministers, and elected legislative body. Following elections won by an antimonarchist left-wing party in 1962 and an abortive uprising by the party's military wing, a state of emergency was proclaimed and the legislature disbanded. Haji Hassanal Bolkiah Mu'izzaddin Waddaulah became sultan in 1967. In 1970 the legislature was made an appointed body. Following the signing of a treaty with the British in 1979, Brunei became fully independent in 1984, and the legislature was suspended the same year. After independence the sultan became an absolute monarch, and oil revenues were used to create a prosperous welfare state.
The 1997–98 Asian economic crisis affected Brunei, which lost billions of dollars in investments. In 1998 the sultan's son, Prince al-Muhtadee Billah, was installed as heir to the throne. After a 20-year hiatus, the sultan convened the appointed legislature in 2004 and signed a constitutional amendment calling for a 45-seat council with 15 elected members. However, the sultan dissolved the legislature in 2005 and appointed a new 29-member council.