Jubilant Libyans chose a new parliament Saturday in their first nationwide vote in decades, but violence and protests in the restive east underscored the challenges ahead as the oil-rich North African nation struggles to restore stability after last year's ouster of longtime dictator Moammar Gadhafi.
Women ululated, while men distributed sweets and the elderly with canes or wheelchairs struggled to get to polling centers in a show of joy over the most visible step toward democracy since the eccentric ruler was killed by rebel forces in late October after months of bitter civil war.
"Look at the lines. Everyone came of his and her own free will. I knew this day would come and Gadhafi would not be there forever," said Riyadh al-Alagy, a 50-year-old civil servant in Tripoli. "He left us a nation with a distorted mind, a police state with no institutions. We want to start from zero."
But attacks on polling centers in the east - where anger over perceived domination by rivals in the west is fueling a drive for autonomy - laid bare the rifts threatening to tear the nation apart.
Still the election for a 200-seat parliament, which will be tasked with forming a new government, was the latest milestone in a revolution stemming from the Arab Spring revolts that led to the successful ouster of authoritarian leaders in Tunisia, Egypt and later Yemen.
Nearly 2.9 million Libyans, or 80 percent of Libyans eligible to vote, have registered for the election and more than 3,000 candidates have plastered the country with posters and billboards. Electoral officials said turnout was 60 percent and counting of the ballots had begun.
"We are celebrating today and we want the whole world to celebrate with us," Prime Minister Abdurrahim el-Keib said after he cast his ballot in Tripoli.
As they did in Egypt and Tunisia, Islamists also hope to rise to power in Libya where they were long repressed under Gadhafi's secular rule. That would leave conservative religious parties with influence over a large and uninterrupted chunk of territory that stretches from Israel's southern border in Egypt to Tunisia.
One of the main contenders in the race was the Muslim Brotherhood's Justice and Construction party, which has led one of the best organized and most visible campaigns.
Three other parties also expected to perform well were former prime minister Mahmoud Jibril's secular Alliance of National Forces; former jihadist and rebel commander Abdel-Hakim Belhaj's Al-Watan; and the National Front, one of Libya's oldest political groups.
The election lines brought together men, women in black abayas and children accompanying their parents. Many voters waved the Libyan red, green and black flag or wrapped it around their shoulders.
Volunteers distributed sweets to mark the occasion and women hugged each other or sang as they waited in line. Others chanted "the martyrs' blood will not go in vain," a reference to the thousands of anti-regime rebels killed by Gadhafi's forces, or held pictures of loved ones killed in last year's fighting.
U.S. Sen. John McCain, an Arizona Republican, gave the election a clean bill of health during a visit to Tripoli. "Turnout is very high, polls crowded and people are obviously enthusiastic. Overall it is a successful operation," he told reporters.
The triumphant mood capped a rocky transition as interim leaders have largely failed to rein in armed militias and provide security while deepening regional and tribal disputes erupted into bloodshed with alarming frequency.
The new parliament is itself temporary, tasked with forming a new government that will take over until a new constitution is drafted so new elections can be held next year.
Saturday's violence - one person was killed and two wounded in the country's east - reflected fears that the country was descending into lawlessness and could face years of instability.
Many Libyans hoped their desert nation of 6 million could become a magnet for investment and thrive. But divisions left by Gadhafi's paranoid 42-year rule, which pitted neighbor against neighbor, town against town and tribe against tribe has proven hard to overcome.
Gadhafi banned political parties and considered democracy a form of tyranny. He governed with his rambling political manifesto, the "Green Book," which laid out his vision for rule by the people but ultimately bestowed power in his hands alone.
The last parliamentary election in Libya was in 1964, five years before Gadhafi's military coup that toppled the monarchy.
The outcome of Saturday's vote could give an indication whether Libya will become a united nation keen on rebuilding and moving away from its dark past or fracture along regional, tribal and ethnic lines.
"This election will tell us whether Libya will turn into another Lebanon," said political analyst Fathy Bin Essa, alluding to the Arab nation wracked by a 1975-90 civil war.
The new parliament initially had two mandates: to elect a new transitional government and to name a 60-member panel to write the country's constitution. Each of Libya's three regions was to have 20 seats on the panel.
However, in a last-minute move, the current National Transitional Council decreed that the constitutional panel will be elected by direct vote instead, angering many candidates who campaigned largely on the basis of their role in overseeing the drafting of a charter.
The decree, according to NTC member Fathi Baja, left the elected legislature without a clear mandate and benefited the Islamists who will rally supporters to help them dominate the constitutional panel.
Baja said secularists were trying to prevent that from happening.
"We don't want a theocracy to replace Gadhafi's authoritarian rule," he said.
Growing resentment in the east - which was the cradle of last year's uprising - over what residents see as an effort to sideline them also has threatened the nation's unity. Local leaders have threatened to unilaterally announce an eastern state in a loose "federal union" with the west.
Some easterners boycotted the election and protesters torched ballot boxes in 14 out of 19 polling centers in the eastern city of Ajdabiya, said Ibrahim Fayed, a former rebel commander in the area.
On the eve of the vote, gunmen shot down a helicopter carrying polling materials near Benghazi, killing one election worker on board, according to Saleh Darhoub, a spokesman for the ruling National Transitional Council.
One person also was killed and two wounded in a gunbattle between security forces and anti-election protesters in the city, according to the head of the election commission. Nouri al-Abari said the polling center targeted by the protesters was later reopened and voting commenced normally.
Ballot papers were also torched and polling centers ransacked in the eastern towns of Brega and Ras Lanouf.
In Benghazi, the largest city in eastern Libya, protesters tried to storm a polling center only to be driven back by voters who fired their own weapons in the air, independent candidate Faiza Ali said.
"Enough with the bloodshed," she said.