Libya’s parliament ousted the country’s new prime minister in a no-confidence vote on Sunday, the latest blow to hopes that political factions could agree on a government charged with restoring stability after last year’s civil war. Mustafa Abushagur was the first prime minister to be elected after the overthrow of Muammar Gaddafi. He represented an offshoot of the country’s oldest anti-Gaddafi opposition movement, and was considered a compromise candidate acceptable to both liberals and Islamists. But his proposed cabinet was struck down by a legislature representing dozens of divided tribes, towns, and regions across the country, many of whom feel they are owed the spoils of victory over Gaddafi. He was forced to withdraw his first ministerial line-up under pressure and his second attempt to submit one resulted in his ouster. In a short statement on Libya al-Wataniya TV after the vote, Abushagur said he respected the decision made by the General National Congress as part of Libya’s democracy but warned of instability if it takes too long to elect his replacement. “There should be quickness in the election of the prime minister and formation of the government so the country does not slip into a vacuum,” he said. He had 25 days from his September 12 appointment by parliament to form a cabinet and win the legislature’s approval, but that deadline expired on Sunday. The congress voted 125 to 44 in favour of removing him as prime minister, with 17 abstaining from voting. He had just put forth 10 names for key ministerial posts on Sunday when the no-confidence vote was held. Until a replacement can be elected by the parliament, management of Libya’s government is in the hands of the legislature. The congress will have to vote on a new prime minister in the coming weeks. The incoming leader will be responsible for rebuilding Libya’s army and police force and removing major pockets of support for the former regime. On Sunday, around 1,000 people protested in the capital Tripoli outside the congressional headquarters to demand that militias operating alongside the army end a partial siege of the town of Bani Walid, considered a major stronghold of former regime loyalists. They called for a peaceful solution to the standoff that has already sent families fleeing from the town in anticipation of a strike. Perhaps the single greatest challenge facing any new Libyan leader is the proliferation of ex-rebel militias. One radical Islamist group has been linked to the attack last month on the US Consulate in the eastern city of Benghazi that killed the American ambassador and three others. There has been a widespread popular backlash against militias since that attack, and the Libyan government has taken advantage of it to try to put some armed groups under the authority of military officers. But some militias have resisted any attempt to fully control them or disarm them. Any prime minister who wants to impose his authority on the militias will need broad national support for his government – but such support is hard to get. Some parliamentarians argued that Abushagur’s cabinet list was not diverse enough and involved too many unknown individuals for key posts. His first proposed cabinet makeup was also criticised for including too many names from the previous interim government, which was seen by some Libyans as weak and corrupt. After 40 years of Gaddafi’s divide-and-rule tactics and the 2011 war, Libya’s towns, tribes and regions are highly polarised. Many feel entitled to high government positions because of their losses in the war against Gaddafi, and are wary of any power wielded by their rivals. In an indication of the charged atmosphere, Abushagur withdrew the initial line-up for government after the parliamentary chamber was stormed on Thursday by protesters from the city of Zawiya – one of several cities that took the brunt of Gaddafi’s attacks during the war – demanding representation. Lawmakers left the General National Congress floor, saying they would not vote under pressure. Before the vote of no-confidence, Abushagur said he was aiming to create a government of national unity that did not appoint ministers according to “quotas”. “The government I proposed is not perfect and was marred by some mistakes, so I changed it for the purpose of national unity,” he said. Independent lawmaker Nizar Kawan, who is aligned with the Muslim Brotherhood in Libya, said the Islamist group’s party and a liberal coalition led by former rebel prime minister Mahmoud Jibril had been holding talks about replacing Abushagur with an independent figure who has no political background. The candidate would then be tasked with forming a government that is run by well-known professionals and is politically balanced and geographically representative. Abushagur had taught engineering at the University of Alabama for about 17 years before leaving in 2002. He was active in the opposition abroad against Gaddafi prior to last year’s uprising. According to Libya’s transition plan, after the formation of a government a new constitution is to be written and voted upon in a national referendum.