Militants have attacked a hotel in the Libyan capital Tripoli, killing at least nine people including five foreigners, officials say.
Several gunmen stormed the Corinthia Hotel and opened fire in the reception area. A car bomb also exploded nearby.
Unconfirmed reports say some of the assailants have blown themselves up. The officials say the dead include one US and one French citizen.
The security forces say the stand-off has now been brought to an end.
The US state department has confirmed the death of a US citizen, without giving any further details. The dead American is believed to have been a security contractor.
The French national is reported to have been working for Libya’s Buraq Air.
There are conflicting reports as to the total number of attackers.
The security forces say that the operation against gunmen who attacked the hotel is now over
A Twitter account linked to Islamic State said the militant group had carried out the attack.
There has been strong evidence to suggest an IS presence in the eastern city of Derna since October, with a group there publicly declaring allegiance to its leader Abu Bakr al-Baghdadi.
However the command structure is still a mystery to most foreign observers.
The BBC’s Rana Jawad in Tripoli says that in the past month there has been a string of incidents in western Libya, including abductions and bombings, that have been claimed by IS social media accounts.
However our correspondent says that it has not been clearly established whether these groups are IS foot soldiers or people inspired by them.
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.”
Different sources at the scene said there were between three and five attackers – video footage released later on Tuesday showed the body of a man reported to be one of the militants.
A security source told the BBC that one gunman had been arrested. Four security guards are among the dead and several people are reported to be injured.
Security forces and emergency services surrounded the hotel at the height of the stand-off on Tuesday
A number of foreign companies have makeshift offices in the hotel, our correspondent says, and housing the few foreigners who remain in the Libyan capital has always been known to be risky.
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”.