Benghazi has seen scores dead and many more injured during the third week of October in armed confrontations. Since October 15, the city has witnessed air strikes by air force jets loyal to retired General Khalifa Haftar, suicide bombings by Ansar al-Sharia against youth neighborhood night watch teams, and street fights between armed residents and Ansar al-Sharia militants. The city is witnessing something similar to an armed uprising by the residents of Benghazi in coordination with army units and forces loyal to Haftar against extremist Islamist groups.

This armed uprising commenced following a statement by Khalifa Haftar on October 14, in which he claimed that his forces were ready to capture the city from the extremist groups that control various parts of the city. He also called upon the “sons of Benghazi” to rise against the extremist groups in their neighborhoods. The General is employing a new tactic to overcome a problem he has faced for months: the use of residential areas by extremist groups, making it impossible for his air force jets to bomb the extremist militants hiding out there. Haftar seems to be coordinating efforts with various neighborhood youth watch teams in a bid to squeeze Ansar al-Sharia and their allies out of the city. Farag from Benghazi said, “The people are in control of their neighborhoods.” Ansar al-Sharia still has strongholds in the central areas of al-Aithi, Ras Obaida, and parts of the western district of Sidi Farag.”

I met Salem at his home in Tobruk. He had been injured fighting against Ansar al-Sharia and their allies in Benghazi under Haftar’s command. When I asked him if he ever questioned whether or not Haftar was doing the right thing and if his military action has escalated the violence in Benghazi, he answered, “Whether it is Haftar or someone else leading this operation. I would rather die fighting these terrorist groups than let them hunt me down like a rabbit.” The injured soldier was referring to the assassination campaign that has plagued the cities of Benghazi and Derna for more than two and a half years. “Haftar is the only one to show concern for the threat against us; he listened to us and then decided to act instead of ignoring us.”

History and previous experience has shown that military options alone will not be enough to defeat terrorism and that the root causes of homegrown terrorism have to be tackled through a range of socioeconomic policies to address issues such as youth unemployment, local development, and investment. Divided countries stand no chance of defeating terrorism and terrorist groups thrive on deep divisions within a society, exploiting such divisions to their advantage. Libya will require both political and military unity in order to defeat extremist groups in the country. However, while Libyans and international community work to achieve this unity, a clear strategy to counter the rise of extremist groups in the country must be put in place. Ansar al-Sharia and other extremist groups will not idly wait for these efforts to succeed. They will continue with their own agenda and strategy to establish themselves as a strong military and social force. This strategy so far has included charity work targeting school children and organizing religious festivals to spread their radical doctrine. It has also exerted gradual control over mosques in cities such as Derna, Benghazi, Sirte, Sabratha, and the capital Tripoli, among others. They have also engaged in an assassination campaign that has primarily targeted military and security personnel, but also includes activists, journalists, politicians, judges, and moderate religious figures who have exposed the jihadist groups’ tactics. The city of Derna illustrates how successful Ansar al-Sharia’s strategy has been. Just over a week ago, I visited Derna briefly, a society disconnected from the rest of Libya and a city under complete control of a mesh of extremist groups, some of which have pledged allegiance to the leader of the Islamic State Abu Baker al-Baghadadi. Last time Derna took part in Libya’s democratic transition, it successfully held the General National Congress’ elections in July 2012. Since then, the city has been unable to hold local elections or to participate in the Constituent Assembly’s elections, tasked with drafting the country’s constitution. Derna has also failed to take part in the House of Representatives elections as extremist groups there prevented polling stations from opening. Extremist groups that viewed elections as a contradiction to their radical doctrine and their own interpretation of sharia teachings bombed some stations. Derna demonstrates just how miserably the Libyan authorities and Libya’s partners in the West have failed, allowing an entire society to be terrorized into submission without providing any strategy to enable them to counter extremist groups. Derna has witnessed public executions sanctioned by the Sharia Court established by the extremist groups there and a sharia enforcement department has been established to carry out policing, judicial activities, and collect taxes that fund extremist efforts to establish an Islamic emirate in the city.

West of Derna lies the small town of al-Guba, where an incident took place a year ago, demonstrating how the social campaigns by extremist groups can be countered through ownership of the real stakeholders—the residents of this small town. In one of the mosques in the town, an Imam began his Friday sermon praising and spreading Ansar al-Sharia’s doctrine in Derna. Initially, no one challenged his sermon, but one young activist decided to intervene after Friday prayers concluded.  He grabbed the microphone and challenged the Imam prompting uproar in the mosque. The incident led to an extended meeting between civil society organizations, tribal leaders, and local authorities, resulting in the Imam’s dismissal and putting an end to his abuse of the mosque to spread what they deemed extremist views. In a recent meeting with this young activist, he told me, “Those who find excuses or try to sugarcoat the actions of extremist groups cannot be part of the solution to the extremism problem.” He highlighted the important role of local communities directly affected by the rise of extremism in their cities and towns, saying, “Those affected by the actions of extremist groups will be more willing to take action without delay.”

Another activist with whom I met during my visit to Derna agreed with his fellow activist from Guba. “We tried to counter the rise of extremism in Derna through civil activism,” he said. “Last year we protested against extremist groups for ten straight days, but their guns were more powerful and we did not get any help from authorities.” Since the fall of the Qaddafi regime, unlike Benghazi, Derna has not witnessed any attempts to enter the city militarily and return Derna to government control. This has not prevented extremist groups from silencing civil society in the city through a string of assassinations targeting civil society activists, army and police personnel, judges, and politicians. “Maybe we did not resist enough, but civil activism alone is definitely not enough to defeat the extremist groups in Derna,” said the activist.

The importance and effectiveness of local stakeholders in addressing the issue of rising extremism is obvious. Haftar seems to be using this strategy in Benghazi militarily by calling on youth groups in various neighborhoods in Benghazi to take control and squeeze extremist militants out of their neighborhoods. Haftar’s forces are making gains in Benghazi and his strategy seems to be working—but at what cost to the society in Benghazi? The use of civilians in armed battles such as that raging in Benghazi could lead to revenge and retribution attacks against families of Ansar al-Sharia militants accused of carrying out assassinations. At least one revenge attack took place against the Swaid family in Benghazi, resulting in the killing of a father, his son, and brother-in–law, because a Swaid family member is linked to the extremist group, Ansar al-Sharia. The incident prompted Haftar to send a message to “the sons of Benghazi” during a TV interview: “I urge all the brave sons of Benghazi to avoid revenge attacks. Any captured militants should be handed over to an army unit,” he said. There is no doubt that the social fabric is the hardest hit as the battle for Benghazi heats up. To mitigate the negative consequences of using civilians to counter the extremist problem, a strategy is desperately needed. Unlike in Derna, the smaller towns of al-Guba and Labraq only few kilometers away allow civil society to flourish and play an increasingly important role. “We would not have been able to continue our work and mission for realizing a civil and democratic Libya if we allowed extremist groups to find a foothold in our towns,” said the young activist from al-Guba. “Look at what has happened to the city of Derna, when extremist groups were unchallenged.”

The governments of France, Germany, Italy, the United Kingdom and the United States understandably condemn the ongoing violence in Libya, calling for the anti-terrorism campaign to fall under the authority of Libya’s legitimate and democratic authorities. But Haftar’s otherwise military campaign fills the gap created by the paralysis of democratically elected authorities in Libya and reluctance of the international community to take decisive action to counter the rising extremist threat. During his brief visit to Tripoli to encourage dialogue between Libya’s parliamentarians, UN Secretary General Ban Ki Moon demanded that Haftar stop his attacks in Benghazi. A Benghazi resident of told me, “To whom does Ban Ki Moon plan on leaving us? And what is his alternative to counter the terrorist groups in Benghazi?” In the absence of an alternative strategy to counter the rise of extremism in Libya, the military approach employed by Haftar and his allies is starting to look like the only viable option for many Libyans.

Mohamed Eljarh is a nonresident fellow with the Atlantic Council’s Rafik Hariri Center for the Middle East focusing on Libya.