TRIPOLI, Libya - Libya's parliament elected a businessman, Ahmad Mitig, as interim Prime Minister on Sunday.
Mitig was sworn in after receiving 121 votes in a volatile debate in the General National Congress that included multiple votes. And there are still disagreements over the legality of the outcome.
The GNC has given Mitig two weeks to form a government.
"We hope it is less than two weeks. As you know, we rushed because the country can not bear this. We need a government to grant a budget in the coming days. ... We wish him luck," said a deputy parliament speaker who was chairing Sunday's session.
The vote comes as the country faces mounting political and security challenges.
Libya's government has been unable to impose its authority over a myriad of militia groups that have grown in power and influence since the 2011 revolution that toppled longtime dictator Moammar Gadhafi.
The parliament first failed to elect the new Prime Minister after a confidence vote fell short of the 120 votes needed.
A live broadcast of the session was terminated when arguments erupted after the vote count.
It took two rounds of voting before Mitig emerged as the frontrunner for the post, but in another confidence vote, he received only 113 votes.
It was unclear what caused the arguments between lawmakers, but at one point, parliament members jumped out of their seats, shouting and gesturing.
Before the vote on Mitig, Libya had been without a head of state since Ali Zeidan was voted out by parliament in March. Zeidan fled the country right away for security reasons.
Former defense minister Abdullah al-Thinni took over as acting Prime Minister for Zeidan. Parliament then elected Al-Thinni as interim Prime Minister, but he later stepped down after an attack on him and his family.
Mitig is now Libya's sixth post-Gadhafi Prime Minister.