On the Instagram accounts of fashion models and superstars last month, the sheikhdom of Qatar looked like one glittering party.
High-heeled designers descended on exhibition openings and fashion shows in downtown Doha. Celebrities, including a prominent gay rights campaigner, snapped selfies on a pulsing dance floor.
"As-salaam 'alykum Doha!" Dutch model Marpessa Hennink proclaimed on Instagram, using the traditional Muslim salutation.
The backlash was swift. Qataris went online to vent their anger about what they called a dangerous and depraved revelry, saying it threatened Qatar's traditional values ahead of the 2022 FIFA World Cup. The Arabic hashtag, Stop the Destruction of Our Values, trended for days.
The episode underscores the tensions tearing at Qatar, a conservative Muslim emirate that restricts alcohol, bans drugs and suppresses free speech, as it prepares to welcome possibly rowdy crowds for the first World Cup in the Middle East.
"Our religion and customs prohibit indecent clothing and behavior," Moheba Al Kheer, a Qatari citizen, said of the avant-garde artists and flamboyant models who mingled with Qatari socialites in late October. "It's normal for us to worry when we see these kinds of people."
World Cup organizers say everyone is welcome during the tournament. Already, foreigners outnumber citizens 10 to one in Qatar. Some Qataris are liberal and open to mixing with foreigners. Many are thrilled about the tournament. But human rights groups have raised concerns over how police will deal with foreign fans' violations of the Islamic laws criminalizing public drunkenness, sex outside of marriage and homosexuality.
Qatar, a tiny Persian Gulf country that once was a dust-blown pearling port, transformed at almost warp-speed into an ultra-modern hub following its 1990s natural gas boom. Expats, including Western consultants and engineers and low-paid South Asian construction workers and cleaners, poured into the country.
Glass-and-steel skyscrapers, luxury hotels and massive malls soon sprung up in the desert. In an effort to diversify away from a carbon-based economy, Qatar's ruling family bought up stakes in things ranging from global finance and technology to the French soccer club Paris Saint-Germain and London real estate.
The ruling emir's sister, Sheikha Al Mayassa Hamad bin Khalifa Al Thani, became one of the world's most important art buyers. His mother, Sheikha Mozah bint Nasser Al-Missned, became a global style icon and bought several luxury brands, including Valentino.
But even as Qatar, among the world's wealthiest countries per capita, looked to the West for inspiration, it faced pressure from within to stay true to its Islamic heritage and Bedouin roots. Qatar's most powerful clan originates from the Arabian Peninsula's landlocked interior, where the ultraconservative form of Sunni Islam known as Wahhabism was born.
Qatari rulers treaded the tightrope between placating its conservative citizens and tribes and shoring up soft power as a major global player.
"Doha's religious discourse to its citizens is very different from its liberal discourse to the West," said 38-year-old Qatari Mohammed al-Kuwari. "It cannot always succeed at both."
The glaring spotlight of the World Cup -- which requires Qatar to relax access to alcohol, create fun outlets for fans and comply with FIFA rules promoting tolerance and inclusion -- raises the stakes.
In years past, the World Cup has turned host countries into the world's biggest party, with joyous crowds drinking heavily and celebrating together. When emotions run high, fans can be euphoric -- or rude and violent.
This will shake up quiet Qatar, where such behavior is deeply taboo and virtually unheard of. Doha is not known for its nightlife. Despite its rapid development over the years, its entertainment offerings remain slim and its public spaces limited.
Some foreign fans fret about how Qatar will handle hordes of drunken hooligans in the streets, given the nation's public decency laws and strict limits on the purchase and consumption of alcohol.
Swearing and making offensive gestures, dressing immodestly and kissing in public may normally lead to prosecution in Qatar. Anti-gay sentiment runs deep in society, like elsewhere in the Arab world. A senior security official has warned rainbow flags may be confiscated to protect fans from being attacked for promoting gay rights.
Fan anxiety is apparent in recent Reddit message boards: "How would the government know if someone is gay?" "How bad is it to wear short pants (Can I get arrested)?" "Is it true that people who say negative things about Qatar on social media get arrested?"
At the same time, conservative Qataris fret about how much their society can bend to accommodate World Cup guests. Doha plans to throw giant electronic music festivals. Authorities say they'll turn a blind eye to offenses like public intoxication, intervening only in response to destruction of property and threats to public safety.
"I hope that the World Cup will not strip society of its religion, morals and customs," said a 28-year-old Qatari man who spoke on condition of anonymity for fear of reprisals.
He said he found comfort in a promise from the country's advisory Shura Council last month that authorities will "ensure the building of a strong society that adheres to its religion" and reject "any excessive behavior" that breaks local taboos.
But because the tournament fulfills the vision of the country's emir, Sheikh Tamim bin Hamad Al Thani, to develop the country, experts say the tiny population of Qataris have little choice but to accept whatever comes.
The emirate brooks no dissent. Qatar's oil and gas wealth has generated a social contract where citizens benefit from a cradle-to-grave welfare state and political rights come after state paternalism.
"If Qatar wants to be on the world map they have to adhere by global standards and values," said Andreas Krieg, an assistant professor of security studies at King's College London. "The government will stand its ground on certain issues, and the population will fall in line."
Al-Kuwari, the citizen, was blunter.
"There is fear," he said. "If a citizen thinks to criticize, a (prison) sentence awaits him."