Libyan elections: Low turnout marks bid to end political crisis
Voting has ended in a Libyan general election marred by low turnout and deadly violence.
The election is seen as a last chance to end the anarchy that has gripped the country since the 2011 overthrow of Muammar Gaddafi.
Officials said about 630,000 people voted, fewer than half of those eligible.
At least five people died in clashes between government forces and militants in the eastern city of Benghazi.
Security officials said Islamist insurgents had opened fire on a local security headquarters. At least another 30 people were wounded, they added.
In a separate incident in Benghazi, unidentified gunmen shot dead human rights activist Salwa Bughaighis at her home shortly after she had returned from voting.
Security officials said her attackers had been hooded and were wearing military uniforms.
Ms Bughaighis, a lawyer, played an active part in the overthrow of Col Gaddafi and became a member of Libya's interim National Transitional Council.
A native of Benghazi, she had three children.
During the day, Libyan TV showed mostly empty polling stations in the main cities.
Some polling stations stayed closed for security reasons in the flashpoint cities of Derna in the east, Kufra in the south-east and the main southern city of Sabha, officials said.
The election was called a month ago amid government claims that a renegade general was plotting a coup.
General Khalifa Haftar denied the allegation, but launched a military offensive against Islamist militias whom he accused of holding Libya to ransom.
At least 70 people were killed in the ensuing battles. Gunmen also stormed the parliamentary building in the capital, Tripoli.
More than 1.5 million voters were registered for the election, down from 2.8 million who registered for Libya's first election in 2012.
The UN had described the poll as "an important step in Libya's transition towards stable democratic governance".
Nearly 2,000 candidates were vying for places in the new 200-seat parliament, the House of Representatives.
Liberal parties defeated Islamists in the 2012 elections, but there were no party lists this time.
Instead, candidates contested parliamentary seats as individuals - a decision taken to reduce tensions, the BBC's Rana Jawad in Tripoli says.
Analysis: Rana Jawad, BBC News, Tripoli
The new parliament will replace the General National Congress, a body that became riddled with controversy, political deadlock and the ideological battles that have raged since the historic election nearly two years ago.
Though many Libyans have grown wary of the politics since then, they have not quite given up on democracy yet. As one prospective voter put it, "We will keep voting until we get the right people in."
It comes at a critical time for Libya, with growing pockets of instability and a prevailing sense of chaotic politics that is crippling the country.
This election is seen as a fresh start, but the underlying divisions, involving political and armed groups, remain. They are all seeking to either overrule or outgun each other. Until these differences are set aside and a compromise reached, the tangible progress many hope for will stay out of reach.
The assembly has been widely blamed for the crisis in Libya, she adds.
The cabinet issued a decree earlier this month that parliament would be based in the second city, Benghazi.
The move appears to be an attempt to placate residents of the city who feel neglected, despite triggering the revolution that led to Col Gaddafi being toppled, our correspondent says.
However, it is unclear whether new MPs would feel safe in Benghazi, which has been badly affected by recent fighting, she adds.