Discuss as:

Libya orders militias to disband, report says

Libya's army has given militias and armed groups 48 hours to leave military compounds, state property and properties of members of the former regime in Tripoli and surrounding areas, the official LANA news agency said on Sunday.

The announcement came after the Islamist Ansar al-Sharia militia was swept out of its bases in the eastern city of Benghazi on Friday in a surge of anger against the armed groups that still control large parts of Libya more than a year after the overthrow of Moammar Gadhafi.

Omar Turbi, a California-based analyst of Libya, told regional news channel Al Jazeera that the "demonstrations ... were a clear indication that the majority of the Libyan people are not in favor of extremism".

The army ordered "all individuals and armed groups occupying military compounds, public buildings or property belonging to members of the former regime to evacuate these sites within 48 hours", threatening to use force if the groups did not comply, LANA said.

U.S. officials praise the Libyan government for its response to the attack on the American consulate, but they're more critical of the Egyptian response to violent protests at the U.S. Embassy in Cairo. NBC's Ayman Mohyeldin reports.

It added that the army had already dislodged a militia from a military complex on the highway leading to Tripoli's international airport on Sunday. It did not name the militia but said the army had arrested its members and seized its weapons.

Protesting Libyans storm militant compound in backlash against armed groups

Friday's invasion of Ansar al-Sharia's compounds, which met little resistance, appeared to be part of a sweep of militia bases by police, troops and activists following a large demonstration against militia units in Benghazi on Friday.

On Saturday, two Islamist militias in the eastern town of Derna, long seen as an Islamist stronghold, announced they were disbanding and evacuating their compounds.

Libya's new rulers have struggled to impose their authority on the myriad of armed groups that have so far refused to lay down their arms, and in fact rely on many of them to provide security.

More world stories from NBC News:

Follow World News from NBCNews.com on Twitter and Facebook