A woman holds a picture of lawyer Salwa Bugaighis, who was killed last month, during a demonstration against her death in Benghazi. (Esam Omran Al-Fetori/Reuters)

None of the dozens of drivers lined up at this gas station in central Tripoli could buy fuel until the big guns arrived.

It was another chaotic day in the Libyan capital, racked by shortages and a sense of peril. The battle-hardened militiamen assigned to protect the pumps insisted on artillery for protection before cars could begin to move.

More each week, a muddled political landscape in Libya is adding turmoil to daily lives. With armed militias running amok, simple tasks such as pumping gas can turn violent in an instant. In recent weeks, many residents have stayed off the streets, transforming the metropolis of about 2 million into a virtual ghost town at night.

Libyans are fed up, residents say, with an incompetent government that has done little to stem the rising insecurity that has taken root since the uprising three years ago.

In addition to the lack of fuel for consumers, energy shortages have contributed to widespread blackouts as summer temperatures rise. A string of robberies, too, has halted the distribution of currency to banks across the city, leaving residents without ready access to cash.

“We don’t go outside anymore because we are afraid,” said Nadia Ralila, a Tripoli housewife waiting in a blocks-long line of cars at the same gasoline station. “The government, they don’t provide security. And the banks have been closed for a week, so my husband cannot withdraw his salary.”

She has not had a full tank of gas for two weeks, Ralila said. “But we ration everything.”

The latest impasse here came in May when the Islamist-dominated General National Congress (GNC) named businessman Ahmed Maiteg as prime minister in a disputed vote that was boycotted by some secular lawmakers.

Libya’s Supreme Court ruled last month that Maiteg’s predecessor, Abdullah al-Thinni, should remain premier — but not before a coterie of anti-GNC militias stormed the parliament building and warned the body against meeting again.

That row set the stage for an even more volatile crisis in the east, where a rogue army general seized on the political chaos to launch a military campaign against extremist militias in Benghazi. Those radical groups have wreaked havoc with a series of assassinations, residents there say. On June 25, prominent lawyer and human rights activist Salwa Bugaighis was gunned down in her Benghazi home.

The twin crises have made daily life in Tripoli, the current seat of the central government and bellwether of the country’s security, both volatile and surreal.

The city is a pleasant seaside hub graced with Italian-style
cafes and steady Mediterranean sunshine, under which residents often spend hours drinking espresso.

“We haven’t left this coffee shop in three years,” Iyad al-Buashi, 56, joked at a cafe nestled under the shade of whitewashed, colonial-era buildings. “It’s because we have nothing better to do since the revolution.”

Within just a few blocks downtown, uniformed police, armed militias and even ordinary citizens were out directing traffic and manning separate checkpoints.

The Tripoli militiamen’s weapons are heavy and alliances fluid. The GNC, which will be replaced following fresh legislative elections that were held June 25, took to convening informal sessions in the lobby of the luxury Radisson Blu Al Mahary Hotel to avoid the chaos.

“The GNC was as dysfunctional as it gets, and it failed to conduct a lot of its most vital tasks,” said Mohamed Abdullah, a GNC member from the progressive National Front Party.

He cites months of inaction on the budget, putting vital government services at risk, as an example of the GNC’s incompetence. The assembly’s sluggishness and a festering culture of corruption, he says, are “hitting the livelihoods” of ordinary Libyans.

“You cannot get anything — from a passport to a deed on a house — without knowing or bribing someone,” he said. “And this impacts the lives of Libyans more than anything.”

Indeed, Libyans here speak of months-long waits for new passports that have yet to be printed, a bureaucratic bottleneck the government attributes to high demand for documents to be issued in the capital.

Haithem Saudi, 23, is so demoralized by the bureaucracy that he operates his small grocery store without a business license, he says. The cumbersome process with a barely functioning government is hardly worth it.

On a recent day in June, Saudi opened the cash register to reveal a stack of receipts he says are for customers who still owe him money for goods they could not afford. The Libyan dinar is down 7 percent since April .

At one of Tripoli’s busiest coffee shops, 20-year-old Kamal Kemo said he normally opens the cafe at 5 a.m. to serve its famed honey-smothered pastry until nearly midnight. But with little available fuel and a cash shortage at the banks, a dearth of customers has forced him to close early.

On the wall behind Kemo is a sprinkling of bullet holes from a shootout at the cafe last month. In the absence of even basic policing by a ragtag and disjointed security apparatus — patched together with the myriad militias that fought in the uprising — Tripoli residents say they fend for themselves.

“Where is this police force we are supposed to go to when there is trouble?” Saudi said. If his shop was robbed, he said, “why would I bother filing a report?’’

Nizar Saraldin contributed to this report.