Mustafa Abdel Jalil, centre, leader of the National Transitional Council waits for the final results of the Libyan elections in Tripoli , Libya (AP/ Manu Brabo)
Final results have placed a liberal alliance ahead of other parties in Libya's first free nationwide vote in half a century.
The results leave Islamists far behind, but each side is already trying to build a coalition with independents.
It appeared to be a rare Arab Spring setback for Islamists, who won elections in Egypt and Tunisia - but the structure of the parliament, heavy with independent members, left the final outcome uncertain.
The election is a major step for a country emerging from 42 years of Muammar Gaddafi's one-man rule. It also marks the end for the interim National Transitional Council, which has been running Libya with varying degrees of success since Gaddafi was overthrown and killed last year.
The election commission said former interim prime minister Mahmoud Jibril's National Forces Alliance won 39 seats, or nearly half of those allocated for parties. The Muslim Brotherhood's Justice and Construction party came in second with 17 seats. Smaller factions won the other 24 seats set aside for parties.
Only one woman won a seat as an independent, according to the final results announced in the capital Tripoli. Unofficial returns showed about 33 women winning seats in the parties section.
In a surprise result, the Islamist National Party, led by ex-jihadist and former rebel commander Abdel-Hakim Belhaj, won no seats.
The balance of power lies with the 120 seats set aside for independent candidates, some of whom are likely affiliated unofficially with parties. The 200-seat National Assembly will be tasked with forming a new government to replace the NTC's Cabinet.
An early test will be a decision on whether to uphold a decree by the NTC for another election to select a 60-member panel to write a new constitution - or revert to the original plan and choose the panel itself.
The power brokering began even before the official results were announced. Mr Jibril's alliance and Islamists, led by the Muslim Brotherhood, are competing for the allegiances of independent candidates, hoping to bring them into ruling coalitions. His alliance beat Islamist parties by tens of thousands of votes, most notably in the country's two largest cities, Tripoli and Benghazi.