The dead included three security guards killed in the initial attack on the Corinthia Hotel, five foreigners shot dead by gunmen and another person taken hostage by the attackers, Issam al-Naass said.
The nationalities of the foreigners and the person taken hostage were not immediately known, but Naass said two of the foreigners were women.
The hostage died when the three gunmen blew themselves up after being surrounded on an upper floor, Naass said.
The 24th floor is normally used by Qatar's mission to Libya but no diplomats or officials were present there during the assault, a security source said.
The head of Libya's self-declared government, Omar al-Hassi, was inside the hotel at the time of the attack but was evacuated safely, Naass said.
Hassi's administration is jostling for power with the internationally backed government of Prime Minister Abdullah al-Thani, formed after a parliamentary election in June.