At least eight people, including five foreigners, were killed when gunmen stormed a luxury hotel in the Libyan capital Tripoli on Tuesday, a local security official said.
It was not immediately clear who staged the attack, but the SITE monitoring service said a militant group claiming affiliation with Islamic State had claimed responsibility. Islamic State has seized swathes of Syrian and Iraqi territory.
Gunfire could be heard inside the Corinthia Hotel, Tripoli's most prominent hotel where government officials and foreign delegations often stay. There were conflicting reports about the exact number and the identity of those killed as the gunmen battled security forces.
"Eight people were killed during the storming of the hotel... Five foreigners, two of them are women. (Also) one security man and two of the attackers," Mahmoud Hamza of the Tripoli security force told local al-Naba television.
Earlier officials said three security guards had been killed in a car bomb blast just before the gunmen stormed the hotel. It was not immediately clear whether the three were among the eight deaths reported by Hamza or were additional casualties.
Hamza did not give the nationality of the foreigners killed. Other officials gave conflicting accounts of whether any foreign nationals had been killed in the attack.
Most foreign governments closed their embassies and pulled their staff out of Tripoli after fighting between two rival factions erupted last summer. But some diplomats, business and trade delegations still visit the capital.
Libya is mired in conflict between two rival governments -- an internationally recognized one based in eastern Libya and a rival administration set up in Tripoli after an armed faction called Libya Dawn took over the capital.
A second official of the Tripoli security force, Omar Khadrwai, told local television the prime minister of the Tripoli-based administration as well as three foreign nationals had been evacuated from the hotel.
Citing social media, the SITE monitoring service said the attack was revenge for the death of Abu Anas al-Liby, a suspected al Qaeda member accused of helping plan the 1998 bombings of the US embassies in Tanzania and Kenya.
Liby died in a New York hospital this month ahead of his scheduled trial.