Libya's parliament has sacked its prime minister-elect, Mustafa Abushagur, leaving the government in disarray three months after the July elections.

Abushagur was dismissed after MPs decisively rejected a 10-member emergency cabinet, itself proposed after MPs turned down his full cabinet choices late last week.

The result leaves the country without firm governance as it copes with warring militias, a moribund economy and the fallout from the killing last month of US ambassador Chris Stevens.

Abushagur, a former exile who spent more than 30 years in the United States, claimed that MPs had failed to put aside parochial claims for the common good. "There was pressure on me, people wanted ministers from their regions,'' he said.

Abushagur's dismissal, with 125 of the 200 MPs rejecting him, underlines the problem of a congress where regionally elected members make up a majority, and where the main parties, the pro-business National Forces Alliance and the Muslim Brotherhood's Justice and Construction party have both failed to form working majorities.

"Because the country is facing challenges, I presented a mini-cabinet," he said.

A reminder of those challenges boomed outside the congress chamber, in the shape of 300 protesters from Bani Walid complaining about a blockade by pro-government militias encircling the southern town.

The government is demanding Bani Walid hand over suspects in the killing of a prominent revolutionary, and has deployed tanks and artillery in preparation for an armed incursion, with fighter jets buzzing the town over the weekend.

Meanwhile police are blockading the eastern coastal town of Susah, site of the ancient Greek city of Apollonia, claiming jihadists responsible for the murder of four police officers are trapped inside.

Some observers remain optimistic, pointing to the fact that the congress is the first parliament elected in Libya in more than 50 years. "It's not uncommon in systems that have proportional representation that it's sometimes a challenge for someone to pull together a government," said Carlo Binda of America's National Democratic Institute. "It happens across the world."