Libyans celebrate after their first free national election in 60 years.
Many defied violence and calls for a boycott and headed to the polls to choose a new national assembly.
It was a chance to draw a line under the legacy of Muammar Gaddafi's dictatorship.
Revellers in Tripoli celebrated after polls closed.
The vote count begun in the eastern city of Benghazi, which saw intense anti-poll protests by those wanting more autonomy.
Earlier in the day a man was killed in a clash between protesters and backers of the poll.
Another man was shot dead by guards in the town of Ajdabiya as he tried to steal a ballot box.
Despite some unrest, authorities said 98 percent of polling stations had opened at some point.
Even in Gaddafi's hometown of Sirte, there was relief that the vote had gone relatively smoothly.
SOUNDBITE: UNNAMED WOMAN SAYING (Arabic):
"This is the era of freedom. For the first time Sirte is free. Not only Sirte but Libya too."
Authorities say voting turnout was just under 60 percent.
The election will eventually pave the way for parliamentary elections next year.
Results are expected on Monday.
Sarah Charlton, Reuters.