Libyan officials have said that at least eight people were shot and killed after gunmen stormed a posh hotel in the capital city of Tripoli.

The Telegraph reported that the masked gunmen entered the Corinthia Hotel on Tuesday and fatally shot at least eight people, which included foreigners, women and a Libyan security officer.

"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.

Two gunmen were said to have blown themselves up after they were surrounded by police.

Reuters noted that while it was not immediately known who was responsible for the attack, the SITE monitoring service said a group affiliated with ISIS is believed to be behind it.

A Corinthia staffer said that the five-star hotel was not busy at the time of the attacks.

The hotel sits on the Mediterranean Sea and is the same place that came under attack in 2013 when a former prime minister was abducted there.