(Adds details, background)
TRIPOLI, May 4 (Reuters) - Libya's parliament failed on Sunday to elect a new prime minister after several inconclusive votes, lawmakers in the North African country said, adding to turmoil in the oil producer.
Businessman Ahmed Maiteeq had emerged as front runner in the final vote but he failed to obtain a quorum in a separate confidence vote needed to confirm his appointment, lawmakers said.
Only 113 MPs voted for him in a televised session interrupted by shouts of arguing lawmakers, falling short of the quorum of 120 votes.
It was not immediately clear what the General National Congress (GNC) assembly would do next. Prime Minister Abdullah al-Thinni resigned three weeks ago, citing an attack by gunmen on his family.
"There are still discussions among Congress members," lawmaker Abdulmenam Al-Yaseer told Reuters. "Some of them have asked to give more time for members who did not attend, while others said that Congress should keep the current government."
Parliament had started voting on Thinni's successor on Wednesday but the session had to be postponed after gunmen of a defeated candidate stormed the building and wounded several people.
Libya is in a chaotic state as government and parliament are unable to impose authority on a country awash with arms and militias, a legacy from the 2011 uprising which toppled Muammar Gaddafi.
Thinni resigned just one month after his election, when he replaced Ali Zeidan who was fired by deputies over attempts by rebels in the volatile east to sell oil independently.
The assembly is deadlocked between Islamists, tribes and nationalists, compounding a sense of gridlock as Libya's fledgling army tries to assert itself against unruly ex-rebels, tribal groups and Islamist militants.
In February, it agreed to hold early elections in an effort to assuage Libyans frustrated at political chaos nearly three years after the fall of Gaddafi. (Reporting by Ahmed Elumami, Feras Bosalum and Ulf Laessing; Editing by Robin Pomeroy and Stephen Powell)
Our Standards: The Thomson Reuters Trust Principles.