Militants
have attacked a hotel popular with foreigners in Libya's capital,
killing at least three people and injuring 12 others, officials say.
Several
gunmen stormed the Corinthia Hotel in Tripoli and opened fire in the
reception area. A car bomb also exploded outside the hotel.
Unconfirmed reports say some of the assailants have blown themselves up and that foreigners are among the dead.
A Twitter account linked to Islamic State said it carried out the attack.
The claim could not be verified, and correspondents say it is not clear if the group has a presence in Libya.
Operation 'over'
A
civilian who witnessed the attack told the BBC: "I suddenly heard shots
and saw people running towards me, and we all escaped from the back [of
the hotel] through the underground garage. The hotel did a lockdown
after that."
The
total number of attackers is not clear. Different sources at the scene
said there were between three and five - one said that several of the
attackers have blown themselves up.
A security source told the BBC that one gunman had been arrested.
There were also conflicting reports about the number of fatalities.
Officials initially said three security guards had been killed by the car bomb blast.
But a local official was later quoted by the Reuters news agency as telling local TV that at least eight people, including five foreigners, had been killed in the attack.
The BBC's Rana Jawad in Tripoli says interior ministry officials have declared that the operation against the attackers has come to an end, but that this cannot be confirmed.
A number of foreign companies have makeshift offices in the hotel, our correspondent adds.
One hotel employee told the Associated Press news agency that the hotel was mostly empty at the time of the attack.
Meanwhile, a hotel security source told the BBC that the hotel had received a threat "a few days ago" warning managers "to empty the building".
'Reprehensible act'
The Corinthia Hotel is popular with foreign diplomats and government officials. The United Nations Support Mission in Libya (Unsmil) has hosted several workshops at the hotel.
Federica Mogherini, the European Union's foreign affairs chief,condemned the attack as "another reprehensible act of terrorism which deals a blow to efforts to bring peace and stability to Libya".
The Twitter account linked to IS said that the group had carried out the attack in revenge for the death of Abu Anas al-Liby, a Libyan jihadist who was suspected of involvement in the bombings of two US embassies in East Africa in 1998.
Liby died in a US hospital on 2 January, days before he was due to stand trial.
Correspondents say it is difficult to assess whether IS has a presence in Libya.
A number of attacks in the country have been claimed by social media accounts that say they represent the jihadist group, however it is hard to verify their claims.
Libya has been hit by instability since the overthrow of long-time ruler Col Muammar Gaddafi in October 2011.
Numerous militias govern their own patches of territory, with successive governments struggling to exercise control.