Brunei and its monarch have enjoyed the good times for decades, thanks to the rich reserves of oil and natural gas in the former British protectorate.
Sultan Hassanal Bolkiah has amassed a personal fortune estimated at $20bn (£15bn). The assets of the Brunei Investment Agency that he oversees are believed to be worth $40bn.
For the 450,000 people of Brunei, that wealth has long delivered free education and healthcare, with government jobs for anyone who wants them. However, profits have slumped along with oil prices. And natural resources are running out.
Even though the country has been courting Chinese investments to try to diversify its economy, younger Bruneians will not enjoy the same benefits as previous generations.
The 72-year-old sultan may be an absolute monarch, who rules as prime minister as well as holding the defence, finance and foreign portfolios, but he is also aware that discontent is rising as the economy falters.
And so he has introduced harsh new punishments under the sharia penal code to bolster his Islamic credentials among the conservative majority Muslim citizenry.
Whether the toughest penalty of death by stoning for adultery and gay sex will be carried out is not clear. Brunei already has the death penalty on the punishment books, but has not conducted an execution since independence in 1984. And under the sharia code, the accused must either confess or four witnesses must testify about the alleged offence.
Yet the new penalties have unleashed international condemnation. “Brunei’s new penal code is barbaric to the core, imposing archaic punishments for acts that shouldn’t even be crimes,” said Phil Robertson, the deputy Asia director for Human Rights Watch.
Boycotts are unlikely to influence the sultan, however, who is the world’s second-longest-serving monarch after the Queen. And he knows that as he shifts Brunei’s focus towards China, with investment in a new oil refinery, dam and roads, he will not face any pushback on human rights issues from Beijing.
The sultan has managed to ride out previous controversies, most notably allegations that his free-spending brother, Prince Jefri, embezzled billions of dollars from the country’s sovereign wealth fund and engaged in alcohol-fuelled parties with models flown in for the occasion.