A girl stands beside a laundry line in a poor neighborhood overlooking Cabinda, a heavily guarded territory that accounts for half of Angola’s oil output. (Nichole Sobecki/For The Washington Post)

As the price of oil rose earlier this decade, this capital city did as well. Glass skyscrapers soared above the rubble of a 27-year civil war. American pop stars such as Mariah Carey were flown in to play private concerts. Luanda would become, its government announced, “a new Dubai.”

But as oil prices have crashed, the impact on one of Africa’s richest and most unequal countries has been devastating. The same officials who boasted of Luanda’s sparkling ascent are asking for billions of dollars in loans. Thousands of people are dying of preventable illnesses, and the nation’s hospitals are out of medicine. A bag of rice can now cost five times what it did a year ago.

On a continent where natural resources have driven generations of boom and bust, Angola has a remarkable and frightening distinction. It is more dependent on commodity exports than just about any other nation in sub-Saharan Africa. It is now paying for that reliance in tragic ways.

This isn’t the only country suffering since the price of oil fell from more than $100 per barrel in 2014 to less than $30 last year, reaching roughly $40 recently. Venezuela is also struggling with shortages of food. Nigeria has been rocked by its biggest economic crisis in decades. But Angola’s descent has been largely hidden from the world, since visas are rarely granted to journalists.

Cranes punctuate the skyline of downtown Luanda, where much of the capital city’s wealth is concentrated. (Nichole Sobecki/For The Washington Post)

A poor neighborhood overlooking oil-rich Cabinda. (Nichole Sobecki/For The Washington Post)

About 45 percent of Angola’s gross domestic product comes from the oil and gas sector, compared with 25 percent in Venezuela and 35 percent in Nigeria, according to the Organization of the Petroleum Exporting Countries.

At Luanda’s Cajueiros Hospital, the oil crisis has morphed into a health emergency. The hospital, like most in Angola, has run out of needles, surgical gloves and almost all medication. The only way patients get treatment is if they or their relatives buy those items on the black market. Most Angolans can’t afford them. In recent weeks, there were no HIV tests or tuberculosis vaccines available anywhere, according to Angolan and international health workers.

After the government slashed its budget by 53 percent last year, the country did not purchase a single dose of malaria medication. In the first three months of 2016, Angola had roughly 1.3 million cases of the disease. At least 3,000 people have died, according to the World Health Organization.

“Now, when you go to any ministry and ask for something, the answer is the same: ‘We don’t have the money,’ ” said Francisco Songne, the top UNICEF representative in Angola.

The economic crisis alone doesn’t explain the country’s alarming public-health mess. Angola’s government has long been riddled with corruption and plagued by mismanagement. The country has the world’s highest child mortality rate, with 1 in 6 children dying before age 5, according to UNICEF officials.

Thanks to soaring oil prices and production, the country’s economy grew at an astonishing average of 17 percent per year from 2004 to 2008. By 2014, Angola had the third-highest GDP in sub-Saharan Africa, after Nigeria and South Africa. But wealth became increasingly concentrated in the hands of a few, mostly people close to the political elite.

Even when the economic downturn occurred, that elite was spending lavishly. In December, one of the country’s largest ­mobile-phone companies, Unitel, paid American rapper Nicki Minaj a reported $2 million to perform in Luanda. Unitel’s chief executive at the time was Isabel dos Santos, daughter of the Angolan president, José Eduardo dos Santos, who has been in office since 1979. In June, Isabel dos Santos — Africa’s first female billionaire — was appointed head of the state oil company.

On a recent day, Christina Da Silva waited outside Cajueiros Hospital to deliver surgical gloves, needles and medicine for her husband, who had contracted malaria. She and her relatives had managed to pool enough money to pay for the $10 pills, an almost impossible price in a country where half of workers earn less than $2 a day. Before the crisis, the medication was free in public hospitals.

“You borrow from your family. You borrow from your friends. You get the money however you can,” Da Silva said. “If you don’t get it, he dies.”

People relax beside the pool at the luxurious Epic Sana hotel, located beside the de Beers building, a 13-story high-rise in the capital. (Nichole Sobecki/For The Washington Post)

A mother braids her daughter’s hair in a poor neighborhood overlooking Cabinda, a heavily guarded territory that accounts for half the oil output from Africa’s top petroleum producer. While the World Bank lists Angola as an upper-middle income country, vast inequality means that life expectancy remains only 53 years, and child and maternal mortality rates are among the highest in the world. (Nichole Sobecki/For The Washington Post)

The country’s few outspoken activists and independent journalists have long protested the stark inequalities in this oil-rich nation. How, they asked, could Luanda have a bustling Porsche dealership and apartments renting at $20,000 per month, and such a vast population of poor people?

Now, those same activists face a frightening question: What will it look like if things get worse?

“Even during the war, we didn’t have this many people dying,” said Rafael Marques de Morais, a critic of the government and the founder of Maka Angola, a watchdog organization, referring to the conflict that ended in 2002.

The crash in oil prices has led to a rapid fall in the flow of U.S. dollars into Angola and a sharp decline in the value of the local currency, the kwanza. That means soaring prices in a country where many basic goods are imported.

It’s not just goods that are imported. Because Angola lacks professionals, it has for years brought in foreign engineers, doctors and teachers to work here. Now it is scrambling to pay them. Last year, hundreds of Cuban doctors threatened to leave the country because they had not been paid in months. The salary dispute was largely resolved, Cuba’s ambassador to Angola told Luanda’s Opais newspaper.

Musicians play for a packed crowd at the Miami Beach club, owned by the daughter of the president of Angola and wealthiest woman in Africa Isabel dos Santos. A sharp decline in international oil prices has hit the economy hard in Angola, one of the world’s most unequal countries, and stirred resentment toward President José Eduardo dos Santos, the leader of Africa’s largest crude exporter. (Nichole Sobecki/For The Washington Post)

For years, Angola has been one of the world’s most expensive countries for expatriates, as oil swelled the value of the currency. Their lifestyles became the stuff of lore — like the story of a Frenchman who paid $100 for a melon at a store and later unsuccessfully sued the seller for profiteering. But for locals earning kwanza, it has never been harder to afford food or medicine, with a devalued currency and slashed welfare programs. Their living conditions have deteriorated in sometimes deadly ways.

One jarring example is an outbreak of yellow fever, the world’s largest in decades. The epidemic has been blamed in part on the government’s refusal to pay for garbage collection in some parts of Luanda because of its shrunken budget. The trash, along with pools of rainwater, attracted swarms of mosquitoes, which carry the deadly disease. So far, there have been more than 3,000 suspected cases and about 350 deaths.

“This was entirely preventable,” said UNICEF’s Songne.

Angola’s 15-year economic boom has made it more difficult for the country to receive international aid; it is now classified by the World Bank as an “upper middle income” country.

“Humanitarian agencies cut their development budget under the assumption that Angola is a middle-income country that can deliver public services,” said Alex Vines, the Africa director at Chatham House, a British think tank. “But the country doesn’t care about the poor in that way.”

Before the economic crisis, Angola’s government had laid out plans for diversification, setting up a sovereign wealth fund, or a state-owned investment fund. That fund, with a $5 billion endowment and managed by the president’s son, José Filomeno dos Santos, had begun investing in hotels, infrastructure, health care and mining across Africa.

Dos Santos, in an interview, emphasized the fund’s role in helping to “shift focus from the extractive industry and to invest in other sectors that could make the domestic economy more sustainable.”

In June, Angola made a loan request to the International Monetary Fund, which agreed in principle to loan the country $4.5 billion. But in late June, the Angolan government abruptly withdrew its request, and the loan was never extended.

“We haven’t seen this sustained oil-price decrease for some time,” said Cobus de Hart, a senior economist at NKC African Economics, a South Africa-based research firm. “That’s what is making it so much more challenging this time — this is a country that failed to diversify its economy, and now it is suffering.”

Correction: An earlier version of this report incorrectly stated that the IMF had extended a $4.5 billion loan to Angola. The loan was never extended.