Authorities in Libya have decided to dissolve all militias and armed groups that do not come under the authority of the state, state media has reported.
The announcement was made by Mohammed al-Megarief, the head of the Libyan national assembly, late on Saturday during a press conference.
"We're disbanding all the armed groups that do not fall under the authority of the government. We're also banning the use of violence and carrying of weapons in public places. It's also illegal to set up checkpoints. We've instructed the appropriate government agencies to ensure that these directives are implemented," he said.
Armed forces in the capital, Tripoli, gave the militias two days to withdraw from government buildings in and around the city that they have occupied since the fall of Gaddafi's regime.
Commander-in-chief Yussef al-Mangush said on his Facebook page on Sunday that the armed forces had dislodged a militia from a military complex on the highway to Tripoli International Airport, arresting militiamen and confiscating their weapons.
"We will carry out these kind of operations for the next two or three weeks until we dislodge all armed groups not under the authority of the State," an army officer said.
||Led by Mohammad Ali al-Zahawi
||The group says it has 100 members in Benghazi, but at least 3,000 supporters came to its protest on September 21
||Some of its members are suspected of being involved in the attack on the US consulate on September 11, but the group denies any involvement
||It only gained notoriety in recent months, and is linked to other more well-known ultra-conservative militias including Rafallah el-Sehati, February 17 Brigade and the Abu Slim Brigade
The authorities also decided to put in place an "operations room" in Benghazi bringing together the army, forces of the interior ministry and defence ministry brigades comprising former rebels.
They have called on the army to impose its authority by putting its own officers at the head of brigades born out of the 2011 revolt, which escalated into civil war and toppled Gaddafi's government.
The announcement of the ban came hours after two armed groups said they would lay down their weapons and leave their bases in the eastern city of Derna.
Derna residents say five military camps are now empty, after Abu Slim and Ansar al-Sharia, the two main militias in the area, withdrew.
"Abu Slim had three camps and Ansar al-Sharia had two. So it's five. Empty. All empty," Siraj Shennib, a 29-year-old linguistics professor who has been part of protests against the militias, told the Reuters news agency by telephone.
The Abu Slim and Ansar al-Sharia decisions were said to have been motivated by events in Benghazi on Friday.
"The militia in Derna saw what happened last night and they decided: we will not kill our brothers. So they disbanded. They said they no longer exist as militias in Derna. They will go home and leave security to the interior ministry and army," Shennib said of Friday's mass demonstrations that saw Ansar al-Sharia withdraw from all its bases in Benghazi.
Shennib said anti-militia protesters had been maintaining a vigil against the groups in Derna for 10 days, and the protests became much larger after a carjacking three days ago.
"The national congress understands that the task to abolish or dissolve the illegal and illegitimate militia groups outside the legitimacy of the state will be easy task for them because public opion and people in Benghazi insist on that," Fathi Baja, a former National Transitional Council member from Benghazi, told Al Jazeera.
Omar Turbi, a California-based Libya analyst, told Al Jazeera that the recent demonstrations "were a clear indication that the majority of the Libyan people are not in favour of extremism".
Residents blame the militia for creating a climate of insecurity.
'We've had enough'
Ansar al-Sharia has been linked to the attack on the US consulate in Benghazi last week in which Christopher Stevens, the US ambassador to Libya, and three other Americans died amid demonstrations over a YouTube video deemed insulting to Prophet Muhammad.
The group denies any involvement in the killing of the US officials.
"The people started coming because it has reached the limit. They are saying: we've had enough," Shennib said. "It was a very peaceful operation. We are happy and we appreciate the effort the militias have done to save people from conflict."
Turbi, speaking to Al Jazeera from Irvine, said the demonstrations against the brigades had "helped Libya's image in the West, particularly in the United States".
The state-run LANA news agency quoted commanders from both militias as saying they were disbanding and vacating their compounds.
Abu al-Shalali, 27, an Abu Slim fighter who trained as an electrical engineer, said there was a non-violent confrontation at one camp between protesters and fighters who did not initially want to leave, but ultimately the armed men decided they could not use force against the crowd.
"We can't kill our brothers and our cousins," he said, adding that the camp had housed a jail with 50 prisoners, all of whom were freed.
He lamented they were common criminals and their release would probably cause a crime spree.
Derna, a coastal city overlooking the Mediterranean, is known across the region as a major recruitment centre for
fighters who joined the wars in Iraq, Afghanistan and Syria.
Brigade headquarters raided
In addition to the raids on Ansar al-Sharia's bases on Friday, youths from across Benghazi also raided the headquarters of Rafallah al-Sehati, an official brigade of the Libyan defence ministry.
A crowd swelling into the thousands moved towards the pro-government compound that safeguards a big weapons store.
Hospital officials told the Reuters news agency they had a total of five dead and more than 60 wounded when the militia opened fire on the protesters to prevent them from driving off with heavy weapons.
Police found six more dead bodies near the compound on Saturday morning, Ahmed Ali Agouri, a police officer said.
The six dead men were bodyguards of a colonel in the regular Libyan army who went missing on Friday, and the prospect that the killings and kidnapping may have been the work of a militia group suggested there could be more tension between the army and militia in coming days.
Nasser Abdelhaaq, a Rafallah al-Sahati commander, said the brigade had returned to their compound on Saturday morning.
He suggested the crowd had been deliberately manipulated to turn on Rafallah al-Sahati, an officially approved militia.