CAIRO (AP) -- With turnout low amid violence and frustration, Libyans voted Wednesday for a new parliament they hope can bring some stability after three years of dizzying chaos in the North African nation, which has hardly had a functioning government and has been plagued by rampant militias and Islamic extremists since the ouster of Moammar Gadhafi.
Islamists and their allies, who held a thin majority in the outgoing parliament, are expected to lose ground in the vote, blamed by many for a political deadlock with their opponents that has virtually paralyzed the political system.
The new 200-member parliament could be a step toward forming a more stable government with lawmakers' backing, paving the way for the writing of the first post-Gadhafi constitution within 18 months and the election of a president. Still, a new government will face the same challenge as previous ones -- forming a unified military and central police force while reining in militias, some of which could lash out with violence if their political patrons lose in the election.
Threats of violence hung over Wednesday's voting, which for much of the day was thin. An explosion hit a polling station in the central city of Sirte, where an Islamic extremist militia has a growing presence, Libya Al-Ahrar TV reported, though it gave no details on casualties.
In the country's second largest city of Benghazi, three people were killed when militias attacked troops deploying to protect polling stations, the station said.
Candidate Essam el-Jihani, an advocate for eastern self-rule, said that the attacks diminished hope for better turnout.
Lack of enthusiasm also hurt turnout. "The outgoing parliament left its scar and people grew hopeless thinking the new council won't be different from the old one," he said. In Benghazi, he said, only about 24,000 of the 190,000 registered voters showed up.
No voting took place in the eastern city of Darna, an extremist stronghold, and some polls were closed in at least two other cities that are frequent scenes of inter-tribal fighting. By midday Wednesday, about 16 percent of the 1.5 million registered voters had cast ballots. There were no immediate complete turnout figures when polls closed in the evening.
The mood was a sharp contrast to 2012 parliamentary elections, the nation's first post-Gadhafi vote, when Libyans enthusiastically formed long lines at polling centers from early in the morning, hoping for democracy after 42 years of his iron grip.
"Many people expect these elections to launch a new political dynamic," Tarek Mitrik, the U.N. Envoy in Libya, said as he toured polls. "Libya needs political institutions that people trust ... institutions that reflect all the diversity present in Libyan society."
The chaos in this oil-rich country of nearly 6 million people has been breathtaking since the ouster and death of Gadhafi after an 8-month civil war in 2011.
The army and police were shattered during the war and have never recovered. Armed militias mushroomed in number and weaponry, and filled the void left by security forces, battling each other and preventing the state from extending its authority.
Over the past two years, militias have briefly kidnapped a prime minister and besieged parliament and government buildings to force their demands. Eastern militias have occupied oil facilities for months, virtually shutting down exports and even trying to sell oil on their own.
The main political blocs -- the Muslim Brotherhood-led Islamists and their non-Islamist opponents -- each have militias backing them, threatening to turn every political dispute into armed conflict.
Al-Qaida-inspired extremists are rampant particularly in the east, where the main city Benghazi sees frequent killings of police, soldiers, moderate clerics and secular activists. On Sept. 11, 2012, Islamic militants overran a U.S. diplomatic facility in the city, killing the ambassador and three other Americans -- and this month, U.S. Special Forces snatched a top suspect in the attack, Ahmed Abu Khattala.
A renegade general, Khalifa Hifter, is now waging his own offensive against militants, vowing to wipe them out. He has garnered the backing of some militias and army units and many anti-Islamist politicians, and his fighters have been clashing almost daily with militiamen around Benghazi.
Libya's politics have been equally tangled. The first post-Gadhafi parliament was initially closely split between Islamists and their opponents. A non-Islamist prime minister, Ali Zidan, was chosen. But over the months, the Islamist bloc gained narrow control as their opponents quit parliament, protesting what they called Islamist domineering.
The Islamists succeeded in removing Zidan and kept parliament in place for months after its mandate ran out in March. Their opponents accuse them of trying to impose their power and of funding militias to back them. Throughout the feuding, the government has been rendered nearly impotent.