Authorities say five foreigners, including American, and five guards dead in attack on Corinthia hotel claimed by Tripoli branch of Islamic State

Gunmen have stormed a luxury hotel in Libya’s capital, killing at least five foreigners and five guards, authorities said.

The attack, which included a car bombing, struck the Corinthia hotel – which sits along the Mediterranean sea. In a brief statement on Twitter, the Tripoli branch of Islamic State (Isis) claimed responsibility, the Site Intelligence monitoring group said.

A spokesman for the Virginia-based security firm Crucible said one of its contractors, a US citizen, had been killed in the attack. The State Department confirmed the death of the American. “We can confirm the death of a US citizen in Libya. We have no additional details to share at this time,” said a senior State Department official.

Tripoli security spokesman Essam al-Naas said an American and a Frenchman were among five foreigners killed. He said the other foreigners who died at the hotel were Asian but gave no nationalities.

Mahmoud Hamza, commander of the interior ministry’s Special Deterrent Force, told private satellite television station al-Nabaa that the situation was under control, though he could not confirm the whereabouts of the gunmen. He also said five foreigners were killed, without elaborating.

Another security official said earlier that gunmen killed three guards and took hostages, but had no further information on who the captives were. He also said that two commercial landmark towers behind the hotel were evacuated out of security concerns.

A hotel worker said masked attackers entered the hotel and fired randomly at staff in the lobby.

He described how the attackers fired in his direction when he opened his door to look out, after which he joined the rest of the staff and foreign guests fleeing out of the hotel’s back doors into the parking lot.

When they got to the parking area, he said a car bomb exploded about 100 metres away. He said the explosion came after a protection force entered the lobby and opened fire on the attackers. Two guards were immediately killed. The hotel staff member spoke on condition of anonymity because he feared retribution.

He said the hotel had Italian, British and Turkish guests but was largely empty at the time of the attack.

The militia-backed prime minister, Omar al-Hassi, usually resides at the hotel but there were conflicting reports from hotel staff about whether or not he was present when the attack began on Tuesday. The hotel previously came under attack in 2013 when a former prime minister, Ali Zeidan, was abducted.

The attack appears designed for maximum impact, coming as the UN begins a new round of Libya peace talks in Geneva.

Just after 9am, armed men stormed into the hotel and started shooting at random in the lobby, mainly firing into the air, a senior hotel worker told the Guardian. When he arrived on the scene he said some attackers were in the lobby with others on the first floor, outside a restaurant.

“I saw two people but I think there might have been as many as five. One of them shouted in Arabic: ‘Where are the Kuffar (infidel)?’ I think they were looking for somebody because one of them looked right at me but didn’t shoot me.” During this first stage of the attack, a female guest was shot dead, he said, but was unable to give further details.

A large explosion was then heard from outside the hotel as a car bomb exploded at the main gate. The Tripoli-based news agency Lana reported that the explosion killed three security guards and caused damage to the facade of the hotel and nearby cars. Six others were injured during the initial storming of the hotel, it said.

Security staff evacuated guests via the back doors of the hotel, the staff member said, adding that the attackers seemed unfamiliar with the layout of the hotel.

While the evacuation was under way, Libyan security forces sealed off nearby roads as ambulances struggled through the mounting traffic to reach the scene. Within an hour hundreds of security personnel were outside the hotel, some in military or police uniforms and others in civilian clothing carrying Kalashnikovs. Heated discussions and shouting could be heard from the road.

Bystanders, watching the events from across the road by the wall of Tripoli old town, heard two shots fired from the hotel at around 11.45am. This was the first sign to civilians, many of which only knew about the car bomb, that the situation was ongoing.

As some members of the security forces tried to clear the streets, others crouched behind cars, pointing their guns at the hotel.

People huddled under an archway in the Medina wall, watching and speculating.

A spokesman from the Malta-based Corinthia Group said the exact order of events was still unclear. “Our management people are only now going back into the premises and assessing the damage,” he said. “It is likely that there were casualties but I cannot yet confirm this.”

He confirmed that Libyan security forces brought the situation under control shortly after 3pm local time.

After the shooting in the lobby, the attackers went up in the lifts, damaging the CCTV cameras as they went, making it difficult to establish exactly where they were in the hotel, the spokesman said.

He added that, in the end, the men were surrounded on all sides and were cornered in a stairwell, somewhere around the 20th floor. “Nothing is certain yet, we are still taking stock of the situation,” he said.

Another hotel source said security sources had confirmed five men were involved in the attack. One was captured and the other four are dead. Three of these reportedly blew themselves up with grenades on the 21st floor.

Social media sites claimed the attack is the work of Isis in revenge for the death earlier this month of Abu Anas al-Libi, arrested by US Delta Force commandos in the Libyan capital two years ago.

Libi was indicted and awaiting trial in New York on charges of bombing US embassies in east Africa and died in hospital on 2 January.

Isis is rapidly making its presence felt in Libya. Earlier this month, the government said the Islamist militants were responsible for the execution of 14 soldiers captured near the southern town of Sabha.

The group is, meanwhile, holding 21 Egyptian Coptic Christians – abducted from the town of Sirte. Isis units, including fighters who have returned from Syria, have already taken control of the coastal town of Derna, proclaiming it an Islamic caliphate and staging ritual executions.

In December, the Pentagon warned that the presence of Isis in Libya was growing and said it had evidence training camps have been set up.

Isis has taken advantage of the chaos in Libya caused by a civil war being fought between two rival governments; the recognised government which has fled to Tobruk and a rival administration, Libya Dawn, which holds Tripoli.

UN envoy Bernardino Léon is attempting to get all sides to agree to a peace plan, but the Geneva talks are hampered by Libya Dawn refusing to send a delegation.

Six months of fighting has left more than a thousand dead, some towns in ruins and more than 400,000 people displaced.