Tripoli, Libya (CNN) -- Libyan army troops raided a former military base in Tripoli Sunday, kicking out a rogue infantry brigade and detaining its members.
The raid came shortly after the army issued an ultimatum giving unauthorized militias 48 hours to withdraw from military compounds, public buildings and property belonging to members of the former regime in the country's capital and surrounding areas. A statement from the army vowed to "use force to carry out these orders," the state-run LANA news agency said.
The brigade targeted by troops Sunday had not been following orders from Libya's military command, the Libyan army's National Mobile Force said in a statement posted on its Facebook page.
Militias and other unauthorized armed groups have come under increased scrutiny since individuals from a radical Islamist group were accused of involvement in the attack at the U.S. Consulate in Benghazi earlier this month that left four Americans dead.
Mohamed al-Magariaf, president of Libya's General National Congress, has said rogue militias would be disbanded.
On Friday, hundreds marched in the eastern city of Benghazi and took over the headquarters of Islamist militia Ansar al Sharia. Protesters Friday demanded an end to all security activities of armed groups operating outside the official command of the army or police.
On Saturday, state news and a source said two Islamist militias had agreed to close their bases in the eastern Libyan city of Derna. A third base will be shut on Sunday, said the source, who spoke on the condition of anonymity.
The state-run LANA news agency said the militias, which it identified as Bou Salim Martyrs and Ansar al Sharia, will also disband.
Members of Ansar al Sharia are among the eight people detained in connection with the September 11 assault on the U.S. Consulate in Benghazi, Libya's prime minister said last week, though he added that not all the attackers came from one specific group.
Initial reports indicated that, ahead of the consular attack, Ansar al Sharia had organized a protest to decry an inflammatory film that mocks the Prophet Mohammed and also protest the United States, where the film was privately produced.
U.S. Ambassador Chris Stevens was one of four Americans slain in the assault.
"You see what's playing out now with people trying to get their militias under control, which, that's been a huge problem," Rep. Mike Rogers, chairman of the House Intelligence Committee, told CNN's "State of the Union" on Sunday. "I think this is more than that. This clearly was a specific attack (on the consulate)."
The deadly attack on the U.S. Consulate underscores the power vacuum across Libya since the toppling of Moammar Gadhafi's regime last year, one analyst told CNN.
Fighting groups that battled Gadhafi have stepped in to maintain law and order after the fall of the regime, said Frederic Wehrey, a senior associate in the Middle East Program at the Carnegie Endowment for International Peace.
The fledgling government is in a bind, he said, as officials try to demobilize militias and bring these groups into the government security forces.
Militia members across Libya remain loyal to their groups and distrust the new government's authority, in part because of the "taint" of a link to the Gadhafi regime, Wehrey said.
In a February report, Amnesty International said armed militias in Libya were committing human rights abuses with impunity, threatening to destabilize the country and hindering its efforts to rebuild.
CNN's Arwa Damon, Salma Abdelaziz and Joe Sterling contributed to this report.