Libya's first countrywide elections in nearly five decades brought hints Sunday of an Arab Spring precedent: Western-leaning parties making strides over Islamist rivals hoping to follow the same paths to power as in neighbours Egypt and Tunisia.

While final results from Saturday's parliamentary election could still be days away under a two-tier selection system, unofficial and partial counts from Libya's biggest cities suggested liberal factions were leading the Muslim Brotherhood and allies in a possible first major setback to their political surge following last year's uprisings.

If the Libyan trend holds — which is still far from certain — it would challenge the narrative of rising Islamist power since the fall of Western-allied regimes from Tunis to Cairo. It also could display the different political dynamics in Libya, where ethnic loyalties run deep and groups such as the Muslim Brotherhood at times co-operated with the rule of Moammar Gadhafi.

"Anyone with past ties with old regime is hated, even despised," said Fathi al-Fadhali, a pro-Islamist Libyan political analyst who lived in exile for 30 years. "Any political names associated with the regime are immediately politically burnt by that association."

Ultimately, the 200-seat parliament will face the task of forming a government — which could become tests of strength for Islamists and secular forces over questions such as women's rights, the extent of traditional Islamic law and relations with the U.S. and other Western nations that helped bring down Gadhafi.

'Anyone with past ties with old regime is hated'—Fathi al-Fadhali, Libyan political analyst

For now, the ballots have to be portioned out according to two categories: Eighty seats are set aside for party lists, and the remaining 120 for individual independent candidates.

In the first group, a liberal alliance led by the former rebel prime minister Mahmoud Jibril appeared to hold more than half the seats in the capital, Tripoli, and the revolution stronghold of Benghazi, according to several party representatives. They spoke to The Associated Press on condition of anonymity because they were not authorized to brief media.

In western Libya, where Jibril's tribe, the Warfalla, is prominent, his party also was on the top in the early counting, the political officials said. In Libya's third-largest city, Misrata — which was besieged by Gadhafi forces for weeks — an upstart faction of local politicians appeared to hold the lead in another possible blow to Islamists.

mi-libya-election-fingerrtr

A man shows his inked finger as he celebrates at the end of voting day in Benghazi, Libya, on Saturday. (Youssef Boudlal/Reuters)

Faisal Krekshi, secretary general of Jibril's Alliance of National Forces, said the results were based on reports by party representatives at ballot counting centres across the vast desert country of six million people. Even officials from rival Islamist parties — the Muslim Brotherhood's Justice and Construction Party and the Islamist al-Watan — described Jibril's alliance as the biggest winner in the race for the 80 party seats.

Independents are key

But even if true, that is still a long way from victory.

The bulk of the parliament — 120 seats — will be decided by the results from the head-to-head races among thousands of candidates, making it nearly impossible to predict.

Shortly before the voting, Libya's Grand Mufti issued a religious edict prohibiting Libyans from voting for secularists. Meanwhile, independent candidates are seen as possible wildcards and could punish both the Muslim Brotherhood and Jibril's factions for having former ties to the Gadhafi regime.

mi-burning-ballots-libya-rt

Used ballot booklets, which were set on fire by anti-election protesters, burn in a square in central Benghazi on Saturday. (Youssef Boudlal/Reuters)

"We are all waiting and we have nothing to suggest that one party is ahead of others," election commission chief Nouri al-Abar told reporters. He also refused to set a date for announcing complete results. Some observers believe it could take nearly a week.

Jibril's liberal alliance of about 40 groups has emphasized the need for a "civil democratic" state, but said that Islamic Sharia law should guide legislation. Jibril also made a point to appear with Muslim clerics in campaign photos even though he is prohibited from running under rules barring NTC members from the ballot.