Libya's parliament on Sunday passed a no-confidence vote in the newly-elected prime minister, removing him from his post, in the latest blow to stability in the war-ravaged country.

Mustafa Abushagur was Libya's first elected prime minister after last year's overthrow of dictator Moammar Gadhafi that ended eight months of civil war.

He had 25 days from his appointment to form a Cabinet approved upon by parliament, but that deadline expired on Sunday as legislators moved to unseat him. The General National Congress voted 125 versus 44 in favor of removing him as prime minister, with 19 abstaining from voting.

Until a replacement can be nominated, management of Libya's government is in the hands of the legislature.

'The government I proposed is not perfect and was marred by some mistakes, so I changed it for the purpose of national unity.'—Mustafa Abushagur

Abushagur represented an offshoot of the country's oldest anti-Gadhafi opposition movement, and was considered a compromise candidate acceptable to both liberals and Islamists.

But he failed to produce a list of ministers that could win the approval of enough legislators. After 40 years of Gadhafi's divide-and-rule tactics and the 2011 war, Libya's towns, tribes and regions are highly polarized. Many feel entitled to high government positions because of their losses in the war against Gadhafi, and are wary of any power wielded by their rivals.

In an indication of the charged atmosphere, Abushagur withdrew his 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 Gadhafi's attacks during the war — demanding representation. Lawmakers left the General National Congress floor, saying they would not vote under pressure.

PM failed to form cabinet

Before the vote of no-confidence, Abushagur said he was aiming to create a government of national unity that did not appoint minister 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.

He had submitted 10 names for key posts for parliament's approval, saying the remaining 19 posts would be managed by his proposed deputy prime minister. But Congress instead voted to remove him.

Independent lawmaker Nizar Kawan, who is aligned with the Muslim Brotherhood in Libya, said the group's party and a secular coalition led by former rebel prime minister Mahmoud Jibril were already holding talks about replacing Abushagur with an independent to form a government that is run by well-known professionals and is politically balanced and geographically representative.

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.

Perhaps the single greatest challenge facing the new leader is the proliferation of ex-rebel militias. One radical Islamist militia has been linked to the attack last month on the U.S. Consulate in the eastern city of Benghazi that killed the ambassador and three others.

There has been a widespread backlash against militias since that attack, and the Libyan government has taken advantage to try to put some of them under central government control. But some continue to resist attempts to disarm them and integrate them into the military and police

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 Gadhafi prior to last year's uprising.