(Bloomberg) -- Summers in the Libyan capital can be brutal, and this one is the worst in memory. As temperatures in Tripoli breach 40 degrees Celsius (104 Fahrenheit), power failures leave residents struggling to stay cool without air-conditioners and fans.

Ahmed, 29 years old, flees outside for relief. The cafe where he used to work folded during a coronavirus lockdown, and he spends his evenings on the Mediterranean waterfront where he can enjoy the sea breeze, even if long stretches of the corniche plunge into darkness during power cuts.

He meets there with his friends to “breathe a little,” and they gripe about electricity and curse the country’s shoddy public services, Ahmed said, declining to give his last name. “Corona what? We have a more serious pandemic, and that’s the government.”

Libya, home to Africa’s largest crude oil reserves, has been wracked by war and lawlessness since a 2011 revolt that toppled former dictator Muammar al-Qaddafi, and the country’s once-robust electricity network is in tatters. Poor maintenance, a shortage of fuel at generating plants, and a blockade stopping oil exports have stretched the power grid to breaking point.

Hundreds of protesters have marched daily in Tripoli to vent their fury about half-day-long power cuts and other government failings. Last week’s marchers, most of them young men, filled darkened streets, chanting: “No lights, no water, we’re fed up!”

Mass protests are rare in Libya, and these outbursts could rock the delicate political balance in the capital. One person was injured on Aug. 23 in the first day of demonstrations, and authorities have called a curfew to try to contain them and the virus.

The latest phase in the country’s civil war brought more blackouts. Military commander Khalifa Haftar and his forces advanced on Tripoli in April 2019, determined to unseat the United Nations-backed government based there. Although he withdrew in June after failing to capture the western city, the fighting damaged transmission lines and control stations.

Looters stripped high-voltage cables from power poles during Haftar’s seige, according to an official at the state-run General Electricity Co. of Libya, known as Gecol. Output nationwide has declined for five years and now meets only about 60% of peak summer demand, the official said, asking not to be identified because they’re not authorized to speak to media.

Gecol says it must wait for demand to ease in the cooler autumn and winter months before doing maintenance work.

“We can’t afford to undergo any servicing for the generation units,” said Naje Abu Zoqia, head of the South Tripoli power station. “We’re in desperate need of every megawatt.”

One potential source of help is Karadeniz Holding AS, a Turkish company that’s in talks with Libya’s government to sell 1,000 megawatts from floating power stations. Turkey, a staunch supporter of the leadership in Tripoli, is seeking business opportunities amid the conflict.

Cash, however, is running out. Haftar’s supporters have shut down ports and other oil facilities, curbing exports and depriving the nation of its main source of income. Crude production has plummeted to 90,000 barrels a day, a fraction of the 1.2 million the OPEC member pumped in January.

Even Haftar’s power base in eastern Libya is paying a price. The National Oil Corp. warned last week that the blockade, which also affects the gas produced at oil fields, will lead to worsening blackouts in the east. Gas supplies to power stations in the eastern cities of Benghazi and Zueitina have dropped to 160 million cubic feet per day from 250 million and will probably halt completely, the NOC said.

Libyans are taking matters into their own hands. As in Iraq and Lebanon, businesses and wealthier residents pay for private generators to cool their homes, shops and offices, and the gasoline engines of these machines rumble ceaselessly in many of Tripoli’s neighborhoods.

The poor have little choice but to endure the heat -- a sign of how climate change may already be widening social and economic disparities in the Middle East and beyond.

Alarif Hameeda has had a blockbuster summer selling 3,000 Chinese-made generators, his entire inventory, in less than two months. Last year -- before Haftar’s offensive shattered the grid -- he sold fewer than 1,000, he said from his shop in the city.

To minimize blackouts, Gecol tries to rotate limited power supplies among towns. But armed men frequently storm power facilities, demanding that engineers restore electricity to their areas.

This can lead to bigger cuts and even crash the network. The grid collapsed three times early this month, causing blackouts across southern and western Libya, said Abu Zoqia of South Tripoli power station.

“When a civilian employee is faced with an armed man or an armed group, he can’t do anything but comply,” Abu Zoqia said. “It’s not his responsibility when the state isn’t protecting him.”

©2020 Bloomberg L.P.