A pro-government fighter celebrates the takeover of Bani Walid along the road leading to Misrata, Libya, on Oct. 25, 2012. (Gaia Anderson/AP)

TARHOUNA, LIBYA — A year ago, the desert hilltop town of Bani Walid was one of the last loyalist strongholds to surrender to the rebel fighters who overthrew Libyan leader Moammar Gaddafi.

But the new Libyan government never took full control of Bani Walid, and recently, hostilities have flared again. Pro-government forces launched an offensive in late September to take control of the town from high-profile Gaddafi loyalists, who they said were using it as a hideout.

Last week, after weeks of shelling, the militias said they had cleared Bani Walid and the government declared an end to the fighting, inviting those who had fled the violence to go back. But the militias defied the government’s orders and barred their return for more than a week, relenting only on Wednesday, when residents began trickling back to a battered town with no electricity or running water.

The still-tense situation in Bani Walid, about 100 miles southeast of Tripoli, underscores just how little control Libya’s central government wields over even its most loyal militias, which are being called on to provide security and maintain order across the country. But it also illustrates the deepening divide between the winners and losers of last year’s revolution.

Residents of Bani Walid, members of the Warfallah tribe that populated many of the old regime’s highest posts, said there were no prominent regime figures in their town, despite earlier claims by the militias that they had captured former Gaddafi spokesman Moussa Ibrahim and killed Gaddafi’s son Khamis there. Tripoli later acknowledged that those claims were probably false.

Rather, the town’s residents said the attack fell in line with a larger pattern of discrimination and harassment that Warfallah and other loyalist tribes had suffered since Gaddafi’s fall.

For nearly 10 months, people who live in Bani Walid said they had operated with relative autonomy. A pro-government militia known as the May 28th brigade had briefly seized control at the end of last year but was forced out by a more popular local militia, they said.

But things changed in the summer when local fighters captured Omran Shaban, a fighter from Misurata, a city on the Mediterranean coast. Shaban had become a national hero after he found Gaddafi hiding in a drainage pipe in Sirte in October 2011.

Shaban died in Paris on Sept. 24, succumbing to injuries that his family said were inflicted through torture and gunshots during two months of detention in Bani Walid. Several residents of Bani Walid, interviewed this week, refused to discuss Shaban’s case.

His death prompted the government, the next day, to authorize the offensive on Bani Walid. But it was Misurata’s militias, allied with the local May 28th brigade, that led the assault and then blocked the residents’ return, according to members of parliament, the country’s acting defense minister and locals.

On Monday, the acting defense minister told reporters that the state had no power over the situation.

Residents of Bani Walid agreed. “The government has no control over these militias,” said Hassan Sultan, who fled last week with his family to the nearby town of Tarhouna. Sultan said that the militias were taking revenge on those who had been loyal to the Gaddafi regime and that he feared they might continue their assaults. “There’s a rumor that Tarhouna is next,” he said.

The same pro-government militias that had earlier kept residents out, including the May 28th brigade, on Wednesday were running checkpoints inside Bani Walid and searching people as they returned, residents said, adding that there was strong local opposition to the militias’ presence.

Witnesses who have seen the town in recent days described “very significant” damage. They said that Bani Walid’s municipal buildings bore the marks of heavy shelling and that homes appeared to have been looted and burned.

Omran Shaban’s brother Mohammed, who participated in the assault, said by phone Monday that the offensive was necessary because “the loyalists are causing so many problems for the security and stability of Libya.”

A growing mistrust

But the Bani Walid residents who were forced from their homes in the past month — who local aid groups said numbered in the tens of thousands — said the town had suffered the same fate as other loyalist strongholds that have succumbed to powerful ex-rebel militias since the fall of Gaddafi.

Clustered in temporary housing in Tarhouna, Bani Walid’s displaced echoed their opponents, the rebels-turned-militia-fighters, telling stories of bitterness and deepening mistrust toward the other side. They complained of arbitrary arrests and beatings at the hands of militias in the year since Gaddafi’s fall.

They said that townspeople had participated in the election for a General National Congress last summer but that both of the town’s representatives were subsequently ejected, after being accused of favoring the old regime.

“I voted for whom I thought was appropriate,” said Abdel Salaam Ahmed, a Bani Walid resident who had sought refuge in Tarhouna. “But everyone we vote for is labeled a loyalist.”

Ahmed and others drew comparisons between Bani Walid and Tawergha, another former loyalist town still waiting for a postwar solution.

For their part, the residents of Misurata charge that Tawergha is to blame for the bulk of the atrocities and destruction inflicted on their own town during the war, when Misurata was the most war-ravaged locale in Libya.

A year after Gaddafi’s fall, the former residents of Tawergha continue to live in limbo. Misurata rebels arrested many of the men and forced the rest of the town into exile across the country, their city battered, burned and covered in hateful graffiti. The Misuratans said the Tawerghans can never return. And officials in Tripoli have said the government is powerless to insist otherwise.

‘We can rebuild Libya’

Rights groups and legal experts said it is the mounting list of unpunished atrocities — gruesome murders, torture, rape and disappearances that took place both during the war and in the time since — that has fueled many of the conflicts in postwar Libya.

“It builds up reactions and hatred, and the feeling of victimization,” said Salah Marghani, a human rights lawyer who was named the country’s justice minister Wednesday.

In the absence of a functioning court system and stalemated politics in Tripoli, central authorities have increasingly turned to tribal mediation as a means to navigate justice since the fall of the old regime.

Both pro-government militias and members of the national congress in Tripoli said they might invoke such a solution for Bani Walid. But real national reconciliation requires more than the “we’re all brothers, big hug” approach, Marghani said shortly before his appointment.

Rather, he said, Libya needs fact-finding missions, prosecutors and central law enforcement. Libyans need to believe that justice is attainable, and abuses need to be prosecuted on both sides — in Bani Walid, Misurata, Tawergha and other towns.

It’s an often-mentioned goal in post-Gaddafi Libya, but one that has eluded officials in the past year of political turmoil. Many Libyan officials said they hoped that the approval of a new cabinet on Wednesday might help achieve it.

“We can’t bring back those who died,” Marghani said. “But we can have rule of law. We can pay reparations to the victims of both sides. We can rebuild Libya.”

Ayman al-Kekly contributed to this report.