In 1959, a new constitution was written declaring Brunei a self-governing state, while its foreign affairs, security, and defence remained the responsibility of the United Kingdom, now represented by a High Commissioner. An attempt in 1962 to introduce a partially elected legislative body with limited powers was abandoned after the opposition political party, Parti Rakyat Brunei, launched an armed uprising, which the government put down with the help of British forces. In the late 1950s and early 1960s, the government also resisted pressures to join neighbouring Sabah and Sarawak in the newly formed Malaysia. The Sultan eventually decided that Brunei would remain a separate state.
In 1967, Omar Ali Saifuddin abdicated in favour of his eldest son, Hassanal Bolkiah, who became the 29th ruler. The former Sultan remained as Defence Minister and assumed the royal title Seri Begawan. In 1970, the national capital, Brunei Town, was renamed Bandar Seri Begawan in his honour. The Seri Begawan died in 1986.
On January 4, 1979, Brunei and the United Kingdom signed a new treaty of friendship and cooperation. On January 1, 1984, Brunei Darussalam became a fully independent state.