Army soldiers attend a funeral for militiamen killed in clashes earlier in June. Faced with a weak and outgunned police force, Libyans have reluctantly turned to private militias for their security. (Esam Al-Fetori/REUTERS)

Mohamed Hossain Akari was at home with his parents one day last week when armed robbers drove up and started shooting — an all-too-familiar attack these days in Libya’s increasingly violent capital city.

Akari, 26, fired back with the AK-47 assault rifle he keeps at home, killing one attacker and wounding another. He jumped into his car to report the shootings, but said he drove right past the police station and headed instead to the capital’s real center of justice: the Supreme Security Committees (SSC), a private militia that controls the streets of Tripoli.

“We all know the police don’t have the power to protect me,” he said.

Akari speaks from experience. He is a police officer.

Akari is now detained in a prison run by the militia while a judge considers whether to bring charges against him. “Here I feel safe,” he said.

A member of the coast battalion of the Libya Shield Force Western Brigade sits on a truck with a mounted anti-aircraft gun in Tripoli. (ISMAIL ZITOUNY/Reuters)

Two years after the Arab Spring revolution that toppled longtime dictator Moammar Gaddafi, and one year after the assault on a U.S. compound in Benghazi that killed U.S. Ambassador J. Christopher Stevens and three others, Libya’s fragile government has little control over the nation’s security.

Even minor disputes escalate into frequent gun violence on the streets. Kidnappings and armed robberies are increasing, and government officials and others have been assassinated with guns and bombs. Militants and arms smugglers easily cross poorly protected borders shared with Niger and Chad.

The murky security situation is threatening stability in a desert nation with North Africa’s largest oil reserves. And it is causing new jitters in a region already on edge over rising violence in neighboring Egypt and the looming prospect of U.S. military strikes in Syria.

As the postwar government struggles to rebuild after 42 years of dictatorship, it has left security primarily in the hands of hundreds of private militias, which are far larger and better armed than the country’s poorly trained and equipped police and army.

The militias, most of which were formed to oust Gaddafi in the 2011 revolution, range from ragtag outfits of a couple of dozen men to organized forces of thousands of fighters.

During the revolution, they sprang up in villages, towns and cities across this country of 6.4 million people. Mechanics, merchants and farmers formed militias based on family, tribal, neighborhood or religious ties. They took weapons from Gaddafi’s vast arsenals and became a wildly diverse network united only by the goal of removing Gaddafi.

After the dictator’s death in October 2011, many militia fighters — suddenly regarded as war heroes and liberators — never laid down their weapons.

Many still fight — with guns blazing — over long-standing rivalries. Some have morphed into criminal gangs, some are religious extremists. Many are a mix of everything — cops and robbers, patriots and jihadis — making it hard to identify which are helping Libya’s post-revolutionary transition and which are hindering it.

‘I am a humanitarian’

Perhaps the most powerful man in this baking-hot capital city is Hashim Bishr, 42, the head of the SSC in Tripoli. Charismatic and wearing military fatigues with the sleeves rolled up, Bishr said he earned a degree in library science at a Libyan university and later studied Islamic law, known as sharia, in Saudi Arabia, Mauritania and Tunisia.

He greeted guests in a nearly empty office next to a runway on a sprawling complex in Tripoli that was a U.S. Air Force base from 1948 to 1970. The huge base, seized from Gaddafi’s forces in the civil war, is headquarters for the SSC, which runs its law enforcement operation here and a prison with 260 inmates — including Akari.

Because the police are so weak, Bishr said, the SSC was the only option for filling the “security vacuum left after the war.” He said the SSC gets requests to do everything from investigating kidnappings to mediating between feuding husbands and wives.

Many people interviewed in Tripoli said that even if they fear and dislike the militias, they accept them as the de facto authority. In an emergency, many said, they are more likely to dial 1515 to reach the SSC than to dial 193 to reach the police emergency line that is often out of service.

“I wish nobody would come and knock on my door and ask for help,” Bishr said, constantly reading and responding to messages on his phone. “But the police are not doing their job, so I have to.”

Bishr is widely seen as a Salafist, a deeply conservative Islamist, and many fear he wants to impose sharia law on Libya. Bishr said that is not true.

“People say I am religious, but I prefer to say that I am a humanitarian,” he said.

The government is trying, with mixed results, to bring some of the militias under government control. It is now paying salaries of about $5,700 a year to thousands of fighters whose brigades are nominally joined under two large umbrella organizations, the SSC and Libya Shield.

The SSC handles policing under the Interior Ministry, while the Libya Shield, based in Benghazi in the even more troubled east of Libya, is under the army chief of staff. But even the militias paid by the government are still largely autonomous. They wear T-shirts they made themselves, not police uniforms. They take orders from their own commanders, not from police officials.

Bishr said the SSC has about 161,000 members nationally. He said he has about 29,000 in Tripoli, but only about 12,000 or 13,000 actually come to work. The rest just collect a paycheck for doing nothing, and lax government bookkeepers don’t notice, he said.

“My people are not professionals,” Bishr said. “They make a lot of mistakes. Some are just rebels, they have no background in being a police officer.” He added that he had disbanded some smaller militias under the SSC and sent some members to prison for dealing drugs.

“We are trying to clean ourselves from the inside,” added Khaled Hishri, a burly former fighter who runs the SSC’s 300-member investigative unit and drives a huge black Nissan SUV with four bullet holes.

On the streets, many people are deeply skeptical of the militias’ professed good intentions.

“All these young men are starting to enjoy the power,” said Sami Sadik Khashkhusha, a professor of politics at the University of Tripoli. “They had nothing — no future, no dreams, no ambitions, no money. And now they control everything. It’s gone to their heads.”

Hassan Ali, a political activist who asked that his last name not be used for fear of violent retribution, said he knows a man who earned $11,000 a year as an engineer before the revolution. Now, he said, the man has registered as a member of three militias. Because record-keeping is so poor, his friend is drawing three government paychecks — totaling twice what he made as an engineer.

“They wanted him to come back to his engineering job, but why would he?” he said.

Many militias show no sign of being tamed by the government, including the hard-line Islamist brigade Ansar al-Sharia, which has been identified by U.S. officials as a key force behind the Sept. 11, 2012, attack on the U.S. compound in Benghazi, about 400 miles east of Tripoli.

The Benghazi attack underscored the confusing state of militia activity. When militia fighters assaulted the compound, it was defended by a force of five U.S. diplomatic security agents and four members of a Libyan militia called the 17th February Brigade. State Department officials told reporters the group was a “friendly militia” that had “basically been deputized by the Libyan government to serve as our security.”

The chaotic militia situation continues. In June, Libya Shield members killed about 30 civilians protesting outside the militia’s headquarters in Benghazi. Militia groups also surrounded several government buildings here in the capital earlier in the summer to pressure parliament to pass legislation keeping former Gaddafi loyalists out of government jobs.

The lack of security has taken an economic toll. Tripoli’s Mediterranean skyline is filled with idle cranes over scores of half-finished office buildings and apartments, where construction stopped when the revolution began.

In the past couple of months, security guards controlled by local militias have taken over four key Libyan oil export terminals. Prime Minister Ali Zeidan told reporters last week that Libya’s oil exports, which had been improving, were down to about 15 percent of capacity — 250,000 barrels per day out of a capacity of 1.6 million barrels per day just before the 2011 war.

Libya’s oil and gas industry accounts for almost all government revenue, and Libyan officials have said the disruptions at the oil ports have cost the nation nearly $2 billion.

Militia leaders who seized the terminals have said they are protesting corruption in Zeidan’s government. Zeidan told reporters that the militia groups were simply trying to “export oil for their own profit” to rogue buyers. Underscoring the stakes for Libya’s economy, Zeidan recently warned that any oil tankers trying to dock at the seized terminals would be “bombed from the air and the sea.”

An impossible job

Even the police themselves admit they are not equipped to do their job.

“It’s impossible,” said Mahmoud Ibrahim Sherif, the Tripoli police chief, who blamed the government for failing to properly fund and equip his officers.

He said the city’s 15 police stations were destroyed during the revolution, and only two are fully functioning now. At any given time, he said, he has only about 1,100 officers on the streets of a city with 2.2 million residents.

In the face of spiking numbers of kidnappings and armed robberies, he said, his officers rarely attempt to arrest anyone because “they have more guns than we do.” He said arrest attempts stopped after several incidents in which his cops were attacked with ­rocket-propelled grenades.

Sherif said negotiations with Bishr are under way to phase out the SSC name, vet and train its members and integrate those who qualify into the police. He said that process would take many months, or longer; many here said the situation is so chaotic that it will never happen at all.

In his office on the air base, Bishr said nobody wants his job to disappear more than he does, a position he expresses regularly on his Facebook page.

“This was supposed to be temporary,” he said. “I don’t want the SSC anymore.”