At least seven people, including two suicide bombers, were killed Wednesday in an attack on an election commission office in the Libyan capital, an official said.
The attack left at least five of the commission's employees and guards dead in Tripoli, Abdel-Hakim Balkheir, a member of the commission, told dpa.
"Gunmen first attacked the commission building, then two of the assailants blew themselves up," he added without details.
Smoke could be seen billowing from the building.
Some 10 others were injured in the attack, which bore the hallmark of Daesh militants, Libyan media reported.
There was no immediate claim of responsibility.
Libya has descended into chaos since long-time dictator Momaer Gaddafi's was toppled in a 2011 armed revolt.
The country is split between two rival governments: one in Tripoli and the other in the eastern city of Tobruk. Each is backed by rival militias.
Daesh took advantage of the anarchy in order to expand in the oil-rich country.
In late 2016, the militant group was expelled from their stronghold in Gaddafi's hometown of Sirte.
However, Daesh hardliners are believed to be active in Libya's desert areas.