Libyans defied violence and boycott calls to rush to the polls in their first free national election in 60 years on Saturday, parting with the legacy of Muammar Gaddafi's dictatorship.
While the mood was jubilant in the capital Tripoli, the east of the country was more troubled as anti-poll protesters seeking greater autonomy for a region that is home to the bulk of Libya's vast oil resources sought to disrupt the vote.
One man was shot dead by a security guard as he tried to steal a ballot box in the eastern town of Ajdabiya and there were stand-offs in Benghazi, the cradle of last year's uprising, as protesters stormed several polling stations.
But as voting closed around the country, authorities said 98 percent of poll centres had opened at some point during the day for the election for a 200-head assembly that will name a prime minister and pave the way for parliamentary elections in 2013.
"I am a Libyan citizen in free Libya," said Mahmud Mohammed Al-Bizamti at one centre in Tripoli. "I came today to be able to vote in a democratic way. Today is like a wedding for us."
Zainab Masri, 50, a teacher in the capital, said she felt overwhelmed after voting for the first time in her life.
"I can't describe the feeling. We paid the price, I have two martyrs in my family. I am certain the future will be good, Libya will be successful," she said, proudly showing off her inked finger that showed she had voted.
The election commission said 1.2 million of some 2.8 million registered voters had cast their ballot by 4.00 pm (1400 GMT), with others expected to turn out in the evening once the searing heat had abated.
Candidates with Islamist agendas dominate the field of more than 3,700 hopefuls, suggesting Libya will be the next Arab Spring country - after Egypt and Tunisia - to see religious parties secure a grip on power.
In Benghazi, protesters stormed a polling station just after voting started and set fire to hundreds of ballot slips in a public square in a bid to undermine the election's credibility.
Witnesses said at least four polling stations had been hit in such attacks. One man was shot in the arm and taken to hospital with heavy bleeding after a clash between vote boycotters and those in favour of the election.
"There wasn't enough security at the station to stop the attackers," Nasser Zwela, 28, told Reuters, saying protesters armed with assault rifles had stormed one polling station and shouted at everyone to stop voting.