CARACAS, Venezuela — Swaying to the D.J. and sipping cocktails on the open terrace of a mountain side bar, a party of private-school teenagers in Prada sneakers and Chanel bags looked down over the shantytowns of Venezuela’s capital, Caracas, spread over the valley below.

On the poorer outskirts of the city, residents continue to struggle with water shortages and malnutrition. And in the countryside beyond, Venezuela is falling apart, with residents lacking even the most basic services, like electricity and the police.

But the wealthier areas dotting the capital have undergone a striking economic boom in recent months.

Shopping malls that were deserted six months ago are bustling, and imported SUVs course through the streets. New restaurants and bars are popping up weekly in the wealthier parts of town, their tables packed with foreign businessmen, fashionable locals and government insiders.

“The people are tired of getting by,” said Raul Anzola, the manager of the 1956 Lounge & Bar, which hosted the party. “They want to spend, they want to live.”

Almost overnight, the country’s authoritarian leader, Nicolás Maduro, has made that possible — for some.

With the country’s economy derailed by years of mismanagement and corruption, then pushed to the brink of collapse by American sanctions, Mr. Maduro was forced to relax the economic restraints that once defined his socialist government and provided the foundation for his political legitimacy.

The changes have helped transform Venezuela in ways few in Washington or Caracas had envisioned, but that are reminiscent of how its allies, Cuba and Nicaragua, relaxed Communist policies and allowed some private investment when faced with economic collapse in previous decades.

After years of nationalizing businesses, determining the exchange rate and setting the price of basic goods — measures that have long contributed to chronic shortages — Mr. Maduro seems to have made peace with the private sector and let it loose. And while the country’s economy continues to contract overall, the declining regulations have encouraged companies serving the wealthy or the export market to invest again.

Dollars are now accepted everywhere, despite Mr. Maduro’s frequent denouncing of the United States as the root of all of Venezuela’s problems. The country’s currency, the bolívar, made worthless by hyperinflation, is hard to find.

“I don’t see it badly, this process they call dollarization,” Mr. Maduro said in a television interview in December, referring to the free circulation of dollars. “Thank God it exists.”

Seeing shelves stocked again has also helped ease tensions in the capital, where anger over the lack of basic necessities has, over the years, helped fuel mass protests.

Under the new economy, Mr. Maduro’s supporters among the Venezuelan elite are living handsomely on business deals and stashes of hard currency, which American sanctions prevented them from spending abroad. At the 1956 Lounge, the teenagers and their parents sipped champagne and discussed coming yacht trips.

The transformation also brought some relief to the millions of Venezuelans who have family abroad and can now receive, and spend, their dollar remittances on imported food.

But the boom has also come at a cost.

The new free market economy completely excludes the half of Venezuelans without access to dollars. This exacerbated inequality, that most capitalist of ills, and undercut Mr. Maduro’s claim of preserving the legacy of greater social equality left by his predecessor, Hugo Chávez, and his “Bolivarian Revolution.”

In his speeches, Mr. Maduro continues to promote a vision of Venezuela in which its resources are shared by all, but the gap between the rhetoric and the reality is greater than ever, said Ramiro Molino, an economist at Caracas’s Andrés Bello Catholic University.

“The fight for survival has forced the government to become pragmatic,” Mr. Molino said. “Only the narrative is still socialist.”

Even some members of the ruling party called the changes under Mr. Maduro a betrayal of Mr. Chávez’s Socialist-inspired movement and its stated mission to help the poor.

“This is savage capitalism that erases years of struggle,” said Elias Jaua, Mr. Chávez’s former vice president, who still sits on the board of Mr. Maduro’s Socialist Party.

Oil production, the country’s biggest source of funds, is stabilizing after falling to the lowest levels since the 1940s as Mr. Maduro relaxed the state’s grip on the sector and embraced private investment.

But instead of continuing the lavish public spending that marked the Chávez era, there have been deep cuts to social programs. Venezuela’s government spending dropped 25 percent last year, according to Caracas-based consultancy Ecoanalítica.

The drastic economic liberalization has been accompanied by political repression designed to snuff out the last vestiges of organized opposition to Mr. Maduro’s rule. This new model has led some Venezuelans to call their country the “tropical China.”

In a sign of newfound market confidence, about 100 Venezuelan companies have applied to issue new bonds in 2019, the highest figure in a decade. The country’s biggest rum producer, Ron Santa Teresa, last week completed the country’s first new issue of shares on the local stock exchange in 11 years.

The government has slashed red tape and turned a blind eye to taxation, fueling a boom in private exports of everything from oil to chocolate, enriching the politically connected and traditional business elites.

Imports by private companies overtook those done by the state for the first time in Venezuela’s modern history last year, according to Mr. Molino, the economist.

“There’s a lot of money going around at the moment, you just need to know how to find it,” Zairet López, an accountant, said recently at a packed music festival in Caracas, which charged a $70 entry fee, or the equivalent of 14 months’ worth of the country’s minimum salary.

The open-air festival, featuring Venezuela’s top émigré bands, $12 hamburgers and artisanal beer, was one of the myriad entertainment events that have blossomed around the once gloomy capital in recent months.

The economic opening has had a starkly unequal impact on Venezuelans.

Well-connected officials and military officers have benefited from a plethora of new business opportunities and government concessions in everything from gold mining to beach hotels. By reducing access to foreign travel and banking, the sanctions have also forced these elites to spend at home, boosting domestic luxury consumption.

Tired of waiting for political change, the upper and middle classes opposed to Mr. Maduro have tapped into the foreign savings set aside during Venezuela’s oil bonanza of the 2000s, when the government gave citizens billions of dollars at highly subsidized exchange rates.

Venezuelans held abroad deposits worth $136 billion in 2018, according to the country’s Central Bank. Even if divided evenly among Venezuelans, this figure equals $4,500 a person. But a few Venezuelans held much more than that.

Those lower down the social scale rely increasingly on money sent by the millions of Venezuelans who have emigrated in recent years to survive. About 40 percent of Venezuelan households receive money from abroad — a total of about $3.5 billion a year, which has become crucial to keeping Venezuela’s economy afloat, according to Mr. Molina, the economist.

“The government has been able to achieve the effect of plenty, and it’s very powerful,” said Félix Seijas, director of the Caracas-based pollster Delphos. “It brings a certain relief that helps to lower the social tension.”

But about half of all Venezuelans have no access to dollars. Most of them live in the provinces, where they barely survive on government handouts of devalued local currency and subsidized food, according to Delphos. Much of that food is imported or packaged by the private companies once derided by Mr. Maduro as coup-mongers and parasites.

And while the stocked shops and busy restaurants have improved the mood in the capital for some, after years of unrelenting economic decline, they have not turned around the country’s overall economic prospects.

Venezuela’s gross domestic product is expected to lose another 10 percent this year after shrinking by more than two thirds since 2013, the largest decline in modern history outside a war zone, according to the International Monetary Fund.

About 80 percent of Venezuelans think they are worse off or the same now as a year ago, according to Delphos. And while the government’s economic changes have lowered the incentive for demonstrations, at least in the capital, almost two out of three Venezuelans said they would protest, if conditions were right.

“The discontent has gone latent, but it hasn’t gone away,” Mr. Seijas said.

For most Venezuelans, Mr. Maduro’s reforms have brought only marginal relief from the economic devastation of recent years.

Mariely Marin, 30, sells cotton candy in a square in downtown Caracas. She makes $2 a day, barely enough to buy food and insufficient to treat a respiratory illness that recently cost her a lung.

“This is a way to cover up the reality,” she said of the throngs of people taking selfies on the lit-up square lined with street sellers hawking popcorn and sweets. “Those who have known another Venezuela understand that things are not well. It’s obvious that the crisis continues.”

The post Venezuela’s Capital is Booming. Is This the End of the Revolution? appeared first on New York Times.