Libya's military command appointed Monday a pair of army officers to head two powerful Islamist militias in the country's east, part of the government's efforts to rein in armed factions amid popular demands that the groups disband. The move reflects the pressure on the government to control the country's militias, many of which it had relied on for securing the country in the turmoil following last year's ouster and killing of longtime leader Moammar Gadhafi. Col. Ali al-Sheikhi, the spokesman for Libya's joint chiefs of staff, told the news agency LANA that the chiefs of the Rafallah Sahati Brigade and the Feb. 17 Brigade, two groups authorities had allowed to manage security in the eastern city of Benghazi, would be replaced with army commanders. Anger at the militias boiled over following the killing of the top American diplomat in Libya and three U.S. mission staffers in an assault on the consulate in Benghazi on Sept. 11. The attack followed an angry protest against an anti-Islam film produced in the U.S. which has riled many Muslims in the region. Members of the radical Islamist Ansar al-Shariah militia are suspected of being behind the attack. Many of those militias were formed in the eight-month war against Gadhafi, but more groups sprang up after the end of the war in October. With the country trying to rebuild after 42 years of Gadhafi, the groups paid little attention to successive interim leaders. They were accused of bullying citizens, operating independent prisons, and holding summary trials for Gadhafi loyalists. Recently, Islamist-led militias have also attacked shrines, such as tombs associated with religious figures, that they considered to be counter to their strict view of Islam. This Friday, thousands of protesters marched against the militias in Benghazi, the cradle of the revolution against Gadhafi, and stormed two of their compounds. Militiamen at the Sahati Brigade's compound fired at the protesters, killing nearly a dozen. In an attempt to deflect the anger, Libya's president ordered all militias to dissolve or to come under a joint operation command to coordinate between the militia brigades and the army. The military already asked all armed groups using captured Gadhafi-era barracks to evacuate them and hand them over. Security forces have already raided a number of sites in the capital Tripoli used by militias. The moves surprised some critics who doubted that the government was strong enough to deal with the militias, particularly the powerful Islamist ones. But many Libyans still feel the government has not done enough. In Benghazi, around 200 people rallied against the militias on Monday, decrying the government decision to retain some of the armed groups even if they were under military command. The protest demanded that all militias be disbanded and its members integrated in the security agencies as individuals. The protesters also demanded an independent investigation into the killing of protesters on Saturday, saying that the government bears responsibility for the actions of a militia upon which it had relied for security. "The blood of the martyrs will not be shed in vain," the protesters chanted. They called for the chief of staff, defense and interior ministers to be sacked.