Crowds of joyful Libyans, some with tears in their eyes, parted with the legacy of Muammar Gaddafi's dictatorship on today as they voted in the first free national election in 60 years.
But in the eastern city of Benghazi, cradle of last year's uprising but where many now want more autonomy from the interim government in Tripoli, protesters stormed a handful of polling stations and publicly burned hundreds of ballot papers.
Authorities said gunmen prevented voters from entering some polling stations in the eastern oil port town of Ras Lanuf and other centres in the restive south failed to open, but said that
Overall, 94 per cent of stations were running normally.
Libyans, most voting for the first time after four decades of Gaddafi rule, are choosing a 200-member assembly which will elect a prime minister and a cabinet before preparing full parliamentary elections next year under a new constitution.
Candidates with Islamic 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 the capital Tripoli, a loud cry of "Allahu akbar" ("God is greatest") went up when voting began at one polling station, a converted school building abuzz with the chatter of queueing locals.
"I am a Libyan citizen in free Libya," said Mahmud Mohammed Al-Bizamti. "I came today to be able to vote in a democratic way. Today is like a wedding for us."
Security was light in the coastal capital, where cars raced through the streets, horns honking and passengers waving the red, green and black Libyan national flag out of the window.
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 stand-off between vote boycotters and those in favour of the elections.
"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 local polling station and shouted at everyone to stop voting.
Western supporters of the Nato-backed uprising that overthrew Gaddafi dismissed suggestions the setbacks proved the election lacked legitimacy.
"I think the best thing for Libya is not to have Muammar Gaddafi massacring his own people ... So far, all indications are that this election was free and fair," U.S. Senator John McCain said in Tripoli after being briefed by poll officials.
UN envoy to Libya Ian Martin told reporters in the capital: "I think we can see already that the problems are in a small enough proportion of the polling centres that it's not going to undermine the overall credibility of the election."
Some voters struggled with procedures for casting their ballot. In one central Tripoli district, two women disappeared into a voting booth together before an election worker hurriedly explained they must vote alone.
"Some of these women are crying as they vote. It is such an emotional day," said one poll official.
Polls close at 8 pm (1800 GMT) but meaningful partial results are not due until tomorrow and a full preliminary count is not expected until Monday at the earliest.
Many easterners, whose region is home to the bulk of Libya's oil sector, are angry that the east has been allotted only 60 seats in the assembly compared with 102 for the west.
Yesterday, armed groups shut off half of Libya's oil exports to press demands for greater representation in the assembly. At least three major oil-exporting terminals were affected.
"The country will be in a state of paralysis because no one in the government is listening to us," Hamed al-Hassi, a former rebel who now heads the High Military Council of Cyrenaica, the name of the eastern region, told Reuters.
Port agents said the oil depot closures would last 48 hours but the government sent a team on Saturday to negotiate a full reopening of a sector that provides most of Libya's revenues.
In Gaddafi's home town of Sirte, a former fishing village on the Mediterranean Sea, the mood before the polls was restrained and some said they would not vote. But no trouble was reported on election day.
Analysts say it is hard to predict the political make-up of the new assembly, but parties and candidates professing an attachment to Islamic values dominate and very few are running on an exclusively secular ticket.
The Justice and Construction offshoot of Libya's Muslim Brotherhood is tipped to do well, as is al-Watan, the party of former CIA detainee and Islamist insurgent Abdel Hakim Belhadj.