Last week, celebrities including Jay Leno, Ellen DeGeneres, Sharon Osbourne, Richard Branson and Clive Davis united for an unlikely cause: a boycott of the Beverly Hills Hotel, because its owner, the Sultan of Brunei, recently announced the implementation of Sharia law in his tiny South Asian nation.

“Theory states that Allah’s law is cruel and unfair,” said Sultan Hassanal Bolkiah, “but Allah himself has said that his law is indeed fair.”

Under Sharia law, the following is considered criminal behavior, punishable by fines, jail, amputation of limbs, public flogging or death by stoning: absence from Friday prayer services; becoming pregnant out of wedlock; wearing indecent clothing, and for women, refusal to wear a hijab; employing a non-Muslim baby sitter; the use of the word “Allah” by Christians and the discussion of faith by any non-Muslims; publicly eating or drinking during Ramadan; theft; homosexuality; and adultery.

The Sultan, now 67, has slowly been moving Brunei in this direction for decades, but this recent, drastic declaration has no clear motive. Brunei is so rich with oil, it’s fully independent; nor is it a target of Islamic extremists.

So, why now?

“Who knows?” says Reza Aslan, religious scholar and author of “Zealot: The Life and Times of Jesus of Nazareth.” “This is obviously not coming from a place of religious devotion, since the Sultan himself is in violation of every single rule of Sharia law you could possibly imagine.”

Indeed, the Sultan and his equally decadent brother, Prince Jefri, were dubbed “constant companions in hedonism” in 2011 by Vanity Fair. He lives in a palace with 1,788 rooms, 257 bathrooms, five swimming pools, a mosque, a banquet hall that holds 5,000 people and a 110-car garage. When he turned 50, the Sultan built a stadium, invited Michael Jackson to perform in it and paid him $17 million for three concerts.

Jefri, 59, maintains a separate pleasure palace and once owned a 152-foot yacht called Tits; he named its tenders Nipple 1 and Nipple 2, and could never understand why others often found that juvenile and crass. Here and abroad, the brothers are infamous for their sex parties and their harems composed mainly of underage girls.

‘Shellfare state’

In 1984, after nearly 100 years as a British protectorate, Brunei gained independence. The Sultan is descended from a centuries-old royal line, maintained by intermarriage among cousins.

Brunei is about the size of Delaware, with a population of 415,000, and the government provides free education, health care, pensions and low-interest loans for the purchase of homes and cars.

Oil is the source of all wealth, and when Shell began pumping in the 1970s, Brunei soon became known as “the Shellfare state.”

In 2012, Forbes magazine ranked Brunei the fifth-richest nation in the world. Yet there is little fun to be had: Alcohol is banned and there is virtually no nightlife or culture.

“I’m trying to think of a place that’s duller,” Australian writer Charles James told Fortune in 1999. “Maybe a British village in midwinter.”

In one way, the brothers adhere to Islamic law: As prescribed, each has several wives and families. But everything else they do is in defiance of the Koran and the law they’ve just imposed.

“It’s a radical double standard,” says Jillian Lauren, who wrote about her life as a member of Jefri’s harem in her memoir, “Some Girls.” “They have more money than anyone else. I know that they both have been married and divorced multiple times. It’s really hypocritical.”

It wasn’t until 2001, when Jefri was forced to auction off personal possessions after using the country as a piggy bank — spending an average of $747,000 a day for 10 years, on top of $17 billion in gifts to friends and family — that the sultanate’s true vulgarity was exposed. (His brother also treats the country as an ATM, and it remains a crime in Brunei for anyone to ever discuss how the royals spend their money.)

Among the family’s possessions:

The Dorchester Hotel luxury chain

More than 17 airplanes, including a private, customized Boeing 747 and an Airbus 340-200 — often used to transport their harems and the South American professional polo players they rent for sport

9,000 cars, including two custom-made Mercedes-Benz firetrucks

150 homes in 12 countries

A private zoo

One 12-foot-tall rocking horse

Four life-size statues depicting Jefri having sex with a fiancee ($800,000)

A global network of employees to procure women

Asprey, jeweler to the Queen of England

10 luxury watches, at a cost of $8 million, that showed a couple having sex every time the hour struck

Hundreds of thousands of suits by Versace and Armani

A golf course designed by Jack Nicklaus

Gold-plated toilet bowl brushes

A sofa shaped like a Cadillac

Dozens of bowling alley machines, pool tables, pizza ovens and grand pianos

A professional lab to develop film

16,000 tons of marble, stacked in warehouses

“With their money, they could have cured diseases,” an adviser to Jefri told Fortune. “But they have little interest in the rest of humanity.”

Another described Jefri and his brother as incredibly dim. “They don’t have a lot of thoughts,” he said. “If you were a fly on the wall and heard their conversations, they’d take you to Bellevue.”

A third brother, Mohamed, was reported to loathe his brothers’ wantonness and profligacy. But when the Sultan tasked him with rebuilding the economy that he and Jefri had so badly damaged, he took more than $2 billion for himself and was promptly fired.

Jefri once hid from his brother in five-star hotels around the world, and in a ploy to get him back, the Sultan reportedly held Jefri’s son Hakeem, then 25, under house arrest. A member of the Sultan’s team found this funny: “Hakeem can leave Brunei any time he wants,” the source told Fortune. “But he wouldn’t know how to pick up the phone and take a commercial flight. So he probably feels trapped.”

Inside the harem

Two years before that, in 1997, Brunei’s long-rumored harems and sex parties were made public when Shannon Marketic, a former Miss USA, sued Jefri and the sultan. In court filings, she claimed a talent agency brokered a $3,000-a-day job in Brunei, where she’d do “personal appearances and promotional work.”

Instead, Marketic said, she was held as a sex slave, forced to dance every night in the prince’s private disco from 10 p.m. to 3 a.m., called a whore and groped at random. Marketic told People magazine that she’d been drugged and molested, and once back in the US, sued them for $10 million, citing “mental anguish, nightmares, difficulty sleeping, other trauma.”

The brothers claimed diplomatic immunity, and the Sultan called the accusation “worse than murder.” The case was dropped.

Lauren, who was recruited as a harem girl at just 18, doesn’t believe Marketic’s allegations. “Her description of what was going on at parties doesn’t ring true.”

Other things do. Upon landing in Brunei, Lauren says, all of the girls were forced to hand over their passports. (Marketic claimed this as well.) Lauren was told never to show her soles — an insult in Muslim countries.

She was warned to watch what she did and said at all times; surveillance was everywhere. She was to keep her weight down, and if that was a problem, there was a doctor on hand with diet pills, sleeping pills — whatever she might need.

Lauren was to bow to the royals whenever one passed, was not to speak unless spoken to, and at all times was to keep her head lower than Jefri’s — who demanded the girls call him Robin, a name he found more American.

He liked American cars and clothes and pop culture but had a more complicated attraction to American girls. “As the decadence increased, so did the number of Americans,” Lauren says. “He would start opening magazines and say, ‘I want that woman,’ ‘I want that one,’ and order them.”

Lauren was one of the rare Westerners who found subservience easy. “A lot of American girls had a bigger problem with it than I did,” she says. “There was one girl who was like, ‘I’m an American. I’m not bowing for anybody.’ She left after a few weeks.”

Most of the girls, she says, were Filipino or Thai, many as young as 15. “There’s no such thing as underage over there,” Lauren says.

The girls were housed in Jefri’s palace and left to waste away until nighttime, almost never permitted to leave. Nights were spent drinking top-shelf liquor in the disco, dancing for the prince and his entourage, hoping that this one night you may be chosen — maybe alone, maybe with other girls.

“You’re out of your mind with boredom,” Lauren says. Weeks passed before she was summoned, ordered into a Mercedes-Benz and driven to an anonymous office building, where she was led into a garish suite and locked inside, alone.

“An hour passed,” she writes. “There were no books, no magazines, no television. I walked in circles. I sat back down. I looked for a bathroom. I tried the door and it was locked . . . I considered peeing in a wastebasket. I was trembling from the cold, from hunger, from nerves.”

After four hours, the prince showed up. They had sex, the prince not wearing a condom, and when he was done, “He lay beside me for exactly three seconds before slapping my ass” and saying, “That was very nice for me. I am late for a meeting.”

Lauren says the prince never used protection and never asked her if she was on the pill or using any form of birth control. She wasn’t screened for STDs.

“It was certainly a concern,” she says. “But we didn’t talk amongst ourselves because it was a very touchy subject — who was sleeping with him when. It was adversarial.”

Lauren was considered a Jefri favorite, and her status was confirmed when Jefri passed her along to his brother, the Sultan. She was helicoptered to Malaysia with no warning, brought to a hotel suite, and left alone with the Sultan, who asked her how she liked his country and then asked for oral sex. She gave it and was dismissed, never to see him again.

“He lay beside me for exactly three seconds before slapping my ass” and saying, “That was very nice for me. I am late for a meeting.”

“That night, Robin was eager to know if [the Sultan] had liked me,” Lauren writes. “He seemed like a little boy looking for his father’s approval.”

Her payment came in jewels, shopping sprees and stacks of cash, which she’d change to US dollars in Singapore. She stashed the bills in two money belts, wore her jewelry and slugged Jack Daniel’s as she smuggled her haul through US customs. In transit, she was no high-class hooker — just another slightly drunk conspicuous consumer.

Over three years, Lauren went back and forth to Brunei for months on end, leaving when the Prince had finally tired of her. “Robin was in London on business when I left,” she writes. “I didn’t even get to say goodbye.”

Keeping his people ignorant

In the palace, none of the girls was ever exposed to news about Brunei, and the media there is state-run.

According to a 2013 report issued by the independent watchdog organization Freedom House, journalists face up to three years in jail for “reporting ‘false and malicious’ news.”

Any criticism of the Sultan or the royal family is also criminal, and the government retains the right to shut down any media outlet they like. As for the Web, only 60 percent of the population has access, and it’s both restricted and monitored.

“On the international market, they can do whatever they want,” says Aslan. “Maybe the Sultan has had some great spiritual awakening — but I doubt it, because he’d do what the Koran says and give away all his money.”

Perhaps the prime motivator for the Sultan’s decree is control: maintaining power, privilege and personal excess at the expense of his country, without his countrymen’s knowledge. Tellingly, he called Islam a “firewall” against globalization — despite the all-too-worldly life he leads.

As for the outrage and celebrity-led boycotts, Aslan finds them misguided and hypocritical.

“What the Sultan is supporting for his tiny island nation is what Saudi Arabia — one of our closest allies — has been doing for decades,” he says. “Is Saudi Arabia at all paying for their human-rights violations? Of course not.”