Iran Press/ Africa: Twenty-one other people were wounded in what authorities said was a suicide attack carried out by "terrorists".
According to Associated Press, Daesh (ISIS) has claimed responsibility for the attack.
A car bomb exploded near the foreign ministry, prompting security forces to rush to the scene, said special forces spokesman Tarak al Dawass.
A suicide bomber then blew himself up on the second floor of the building while a second attacker died when a suitcase he was carrying exploded, he said.
A third assailant, who was unarmed and wearing a bulletproof vest, was killed by security forces outside, Dawass added.
Foreign Minister Tahar Siala said one of the dead was senior diplomat Ibrahim al Shaibi who headed a department in the foreign ministry.
Libya has been in a state of crisis since the overthrowing of its former leader Muammar Gaddafi in 2011.
Since Gaddafi was toppled, a power vacuum in Libya has led to turmoil as warring factions scramble to gain control.
The eastern part of the country is governed by a Libyan National Army-backed parliament located in Torbuk.
The UN-backed Government of National Accord stationed in Tripoli - headed by Prime Minister Faye Sarraj - controls the nation’s west. 101/ 211 / 202
Read More:
Four Killed in ISIS attack in Libya