At least 11 people have been killed and several injured in an attack on Libya’s electoral commission headquarters in the capital, Tripoli, officials say.
A suicide bomber blew himself up while other armed assailants stormed the building and set it on fire, an official at the commission said.
Voters have been registering for elections expected before the end of the year.
Libya has been in turmoil since Muammar Gaddafi was ousted in 2011.
After his 42-year rule, the country remains under the control of myriad rival armed groups.
Although many observers have cast doubt that an election can be secured in the politically and militarily divided country, the international community appears hopeful that it would give the troubled North African state a fresh start.
Electoral commission spokesman Khaled Omar told Reuters three officials and four security officers were killed in the attack. The health ministry later put the number of dead at 11.
He said he saw the attackers, including two suicide bombers, storm the building and spotted bombers’ body parts strewn on the ground.
Mr Omar added that security officers had entered the building to respond to the attack in the Ghout al-Shaal district west of central Tripoli.
Today’s attack is the deadliest and most elaborate of its kind in Tripoli in at least three years, BBC North Africa correspondent Rana Jawad reports.
No group has claimed responsibility but militants with links to the Islamic State group have maintained sleeper cells in Libya’s coastal cities, she adds.