Not too long ago Wasim Ben Hamid's job was to bring Libya's social order crashing down. Now he's trying to build a new one as Benghazi coordinator for the Libyan Shield Forces (LSF), a national umbrella for militias who fought Muammar Qaddafi and are now working with the defense ministry to provide internal security.

Progress has been halting. The enthusiastic young men who triumphed over Qaddafi may not be ideal for day-to-day policing and counter-terrorism work in a country with powerful regional and tribal rivalries and a surplus of weapons.

Mr. Ben Hamid believes his men are up to the task. But the limits of "security by militia" were tragically laid bare by the Sept. 11 attack on the US consulate here that killed Ambassador Christopher Stevens and three colleagues. Regardless of any American security lapses, the bottom line is that both local militias and Libya's nascent official security forces failed to keep the consulate safe.

Afterward, Benghazi residents demonstrated against violence, prompting the Islamist militia blamed for the attack, Ansar al-Sharia, to withdraw from its compound. Locals say Ansar al-Sharia gunmen have disappeared from city streets.

But security across Libya remains fragile, and inter-militia rivalry remains a threat to a country still trying to find its way after four decades of one-man rule.

“The involvement of revolutionary brigades and local armed groups in efforts to end hostilities blurs the line separating neutral mediation from partisan meddling,” the International Crisis Group (ICG), a Brussels-based think tank, said in a report last month.

That makes strengthening national security forces a top priority for the new government, which has yet to be formed since national elections in July. On Thursday, a proposed cabinet lineup by Prime Minister-elect Mustafa Abu Shagur was rejected by the national assembly after a few hundred protesters from western towns with strong militias of their own flooded the parliament building, complaining the proposed government wasn't regionally inclusive.

Mr. Shagur has promised to propose a new cabinet by Sunday. Whether one will be approved then remains an open question. And until there's a government, building effective national security institutions is unlikely. The ICG warned that until then, the "reliance on revolutionary brigades and local armed forces will continue to be an uncertain wager.”

Militia men

The key is breaking down existing militia structures, says Fawzi Waniss, head of the Benghazi section of the Supreme Security Council (SSC), an auxiliary police force of militia fighters working under the interior ministry.

The SCC and LSF have brought most militias under at least nominal government control, says Mr. Waniss. Others are more loosely aligned with the state, while still others remain independent. “In Tripoli, they allowed whole brigades to enter the SSC,” says Mr. Waniss. “That was a mistake.”

In August the loyalty of some of those brigades was questioned after SSC fighters in Tripoli stood by while hardliners from Islam's Salafy sect destroyed mosques which contained Sufi shrines and graves. Adherents of the Salafy school, which is predominant in Saudi Arabia, consider venerating saints apostasy.

Waniss has roughly 18,000 men under his command. He says they were recruited as individuals, rather than en masses as members of existing militias. But in other places, some of the auxiliary cops were recruited before a vetting system was in place, casting doubt on their loyalties.

Meanwhile, Waniss also faces a lack of money.

“A lot of people don’t have work, so they want to join the SSC,” he says. But his office has stopped hiring, and recruits are only getting half their official monthly salary of 1,000 Libyan dinars ($800).

Anis Sheiki receives 900 dinars a month for his service in the Libyan Shield Forces. The LSF is a parallel army under the defense ministry, as the SSC is a parallel police force. “A state is meant to have an army,” he says, keen to note his pride at joining the LSF. “An army for stability, so that we can have institutions, free opinion, rule of law."

He is visiting an art exhibit in a government building of Italian colonial vintage, surrounded by machine-like statues, humanoid and bestial, made from battlefield detritus to evoke the malice of Qaddafi’s regime.

In 2003, the regime jailed Mr. Sheiki as he prepared to travel to Iraq “to join the resistance,” he says. He was held for 19 months in Tripoli’s Abu Salim prison. He fought in last year’s revolution, leaving his militia last November. In August, lacking work, he joined an LSF brigade. Another part of the exhibit includes photos from the revolution that make him remember “how it was then, all of us together.”

For Ben Hamid, the LSF retains a grassroots legitimacy that national institutions currently lack. While Libya’s national police and army predate last year’s revolution, and served Qaddafi, LSF brigades have sprung from the fight to change the country. “The army and police don’t have a relationship with the people,” Ben Hamid says. “We’re of the people.”

Nevertheless, the force has sometimes proved divisive. Last spring LSF units deputized to end ethnic fighting in the southeastern city of Kufra were accused of siding with one of the tribes involved in the conflict.

Deployments

Ben Hamid oversees LSF deployments across eastern Libya. Last year’s war left fighters with “every weapon that exists in Libya,” he says, from AK-47 assault rifles to tanks. Most envision military careers.

In theory, the LSF is meant to work outside cities and along borders, says Ben Hamid. But in practice, flare-ups can see the LSF called to work in cities alongside police, army, SSC, and various government-aligned militias.

When reports came in of trouble last week, Ben Hamid sent out carloads of his forces. Some went to a police station under attack by a mob, others to the compound of an LSF brigade where protesters had gathered in an apparent case of mistaken identity.

Several Libyan Army trucks were parked on the street outside the compound, the soldiers kitted out in tan camouflage and body armor. Dozens of LSF fighters crowded the access road, some armed with Kalashnikovs. The protestors had already left, they said.

Standing to one side, Hussein Fetouri, an LSF liaison to the force’s brigades, described the protest and its denouement. “The protestors said ‘You must align with the government’, and we said, ‘We’re already with the government.’ Then ‘You’re Muslims, we’re Muslims,’ and that was the end of it.”

That dispute was resolved with relative ease. But it’s unclear how long the calm will last.

Militiamen from Misurata have reportedly massed for a possible attack on the town of Bani Walid to avenge Omran Shaban, a Misuratan fighter who died last month from injuries his family say occurred during weeks of captivity there.

Yet gradually, some Libyans believe – or want to believe – that order is returning.

Last Saturday hundreds of Benghazi residents – albeit none from militias – queued up in the seaside Liberation Square, where the first anti-Qaddafi demonstrations erupted last year, to hand over their weapons to the army.

One was Adil, 34, a gas station worker who declined to give his surname. He served in a brigade during the war and hung onto his Kalashnikov afterward.

After giving it up, he went for a coffee at a kiosk by the square.

“When I let it go, I felt myself relax,” he said. “A gun is something for a soldier. Now I can be a civilian again.”