Libyan officials say an attack on the country's electoral commission in the capital Tripoli has killed at least 12 people.
At least one of the attackers blew himself up inside while other militants stormed the building.
Islamic State has claimed responsibility for the attack.
"[It] is a clear manifestation of everything that is wrong with the current shortsighted narrative of fake security and 'progress,''' said Hanan Salah of Human Rights Watch in a post on social media. Her group has underlined how elections will be difficult while Libya remains dominated by a patchwork of armed groups who continue extra-judicial killings, property confiscation, forced disappearances, arbitrary detention and torture.
Libya has been in chaos since longtime dictator Moammar Gadhafi was toppled and killed in 2011. The country is now split between rival governments, each backed by an array of militias. An internationally recognized administration has been set up in the western capital of Tripoli.
The uncertainty in Libya has opened the door to terror groups such as IS to set up camps.
Some information in this report was provided by Associated Press