BENGHAZI, Libya -- The killing was not a shock here, in the city where Libyans started their quest to shake off dictatorship and now struggle, nearly two years later, to douse the simmering violence that is a legacy of the revolt.
One evening last week, a car screeched down a residential street. Three men stepped out and with startling ease gunned down Faraj Mohammed el-Drissi, the man whose job it was to ensure this city's security.
Mr. Drissi, who had been on the job since October, was among roughly three dozen public servants killed over the last year and a half, including army officers, security agents, officials from the deposed government and the United States ambassador, J. Christopher Stevens. In all the cases, no one has been convicted, and in many, no one has even been questioned. That is unlikely to change anytime soon.
Since Col. Muammar el-Qaddafi was killed more than a year ago, Benghazi has in many ways regained its balance, as residents build long-delayed additions to their homes and policemen direct traffic on some streets. But Mr. Drissi's killing made it hard to ignore a darker rhythm -- one that revolves around killing with impunity. The government is still weaker than the country's militias, and neither is willing, or able to act.
"It is impossible for members of a brigade to arrest another," said Wanis al-Sharif, the top Interior Ministry official in eastern Libya. "And it would be impossible that I give the order to arrest someone in a militia. Impossible."
The violence was thrown into sharp relief after the September attack on the United States intelligence and diplomatic villas. Libyan and American officials accused militants associated with Libya's ubiquitous militias, and specifically, members of Ansar al-Shariah.
"The killing of the ambassador brought back the true reality of this insecure state," said Ali Tarhouni, a former Libyan finance minister who leads a new political party. "It was a major setback, to this city and its psyche."
Justice itself is a dangerous notion here and throughout Libya, where a feeble government lacks the power to protect citizens or to confront criminal suspects. It barely has the means to arm its police force, let alone rein in or integrate the militias or confront former rebel fighters suspected of killings.
"Some had to do with personal grudges," said Judge Jamal Bennor, who serves as Benghazi's justice coordinator. But most were like the killing of Mr. Drissi. "This was a political assassination," he said.
Adding to the feeling of lawlessness are the revelations that foreign intelligence services, like the C.I.A., are active around the country without answering to anyone, people here said. Every day, an American drone circles Benghazi, unsettling and annoying residents. Police officers share Kalashnikovs. The courts are toothless. Libyan and American investigators, faced with Benghazi's insecurity, are forced to interview witnesses hundreds of miles away, in the capital, Tripoli.
And so the government is forced to reckon with the militias, who by virtue of their abundant weapons hold the city's real power. Men like Wissam bin Hamid, 35, who before the revolution owned an automobile workshop, is now the leader of an umbrella group of former rebel fighters. Some groups, like Mr. Hamid's, operate with the government's blessing, while others are called rogue. The distinctions often seem arbitrary, but either way, the militias are effectively a law unto themselves.
Mr. Hamid and others insist that they are loyal to the state. Leading political figures said they respected Mr. Hamid but had concerns about many of the other militia leaders, among them hard-line Islamists.
The militias are called on for crucial tasks, including safeguarding elections. Mr. Hamid's militia, a branch of a group called Libya Shield, has been called on to enforce order hundreds of miles away from Benghazi, in towns beyond the government's reach. The militia has also worked with American officials: they escorted intelligence officers and diplomats away from the besieged villas on Sept. 11, and later, provided protection for American investigators visiting the city in search of evidence in the attack, Mr. Hamid said.
Ultimately, it could fall to Mr. Hamid and his men to confront commanders of Ansar al-Shariah, the hard-line Islamist militia that Libyan and American officials have linked to the attack, since no other government agencies seem capable of the task.
But Mr. Hamid said he would not -- because he believes the militia's leaders are innocent, but also because in Benghazi, the ties between former rebel fighters run deep. "They were with us on the front lines," he said.
Ansar al-Shariah's leaders have strongly denied any involvement in the attack. Mr. Hamid insisted he would act against the group, if given proof it was responsible.
Officials here seem to have no expectation that the militias will ever help solve the killings -- of their top security officials, or of Mr. Stevens -- if another militia may be involved.
Mr. Hamid said that a team of Americans visited his base a few weeks ago. "They were worried about Libya Shield," he said, adding that they seemed to ask a lot of questions about one member in particular, who had appeared in an Internet video talking in front of a black jihadi flag.
Benghazi's security problems are the backdrop to more pressing concerns, like the gap between the aspirations of a public freed from the dictatorship, and the fledgling government's ability to fulfill them. Roads are brightened by new coffee shops and stores. Above them, all the streetlights have burned out. There is a growing anger at the centralization of power in Tripoli, from the residents of a city that have long endured neglect.
After the attack on the American facilities, Benghazi's residents demanded order from the militias who set their own rules. Ten days after the assault, protesters attacked the headquarters of several militias, making little distinction between government-sanctioned and rogue groups. Militia leaders, apparently shocked that the city had turned on them, blamed Qaddafi loyalists for the protests.
The demonstrations also coincided with a growing anger at foreign meddling in Libya, mostly directed at Qatar, which actively supported Islamist militias with money and arms during last year's uprising.
But the day after the protest, the leader of one of Benghazi's army divisions, Col. Hamed Bilkhair, was kidnapped outside of his home. He was later released. Weeks later, the assassins found Mr. Drissi, the security director, who was in the midst of forming committees to better organize the city's safety. Little, it seemed, had changed.
"We're talking about a society filled with revolutionaries and weapons," Judge Bennor said. "No one has been arrested. The families of the victims need to trust that there will be justice."
The militias, still wrapping themselves in the banner of the revolution, insist they will submit only to a government, and to an army that they consider clean. They have set a dauntingly high bar for their leaders, denouncing hard-core Qaddafi loyalists, but also army officers who simply sat out the fight.
Diplomats have become wary of this city, closing it, somewhat, to the world once again.
Ansar al-Shariah, the militia accused in the attack on Mr. Stevens, has lowered its profile, but just a little. With no one reason to hide, the group is planning to open a clinic for women and children in Benghazi.
Osama al-Fitory and Suliman Ali Zway contributed reporting.world
This article originally appeared in The New York Times.