Two policemen were killed when an armed man opened fire at a patrol of Internal Security Forces (ISF) in Tripoli on Monday night.
Two army members were also killed during the shootout with the assailant.
The attacker, Abdul-Rahman Mabsout, was later killed as an Army force raided the building where he hid. He reportedly blew himself up knowing that he was wearing a suicide belt. .
Abu Mohamad Al-Adnani group affiliated to ISIS claimed responsibility for the attack in a statement published by the terrorist organization's Amaq news agency.
Mabsout fought alongside ISIS in Syria and was recently released from prison in Lebanon where he was jailed on terrorism charges.
According to a statement issued by the Army command, Mabsout attacked three targets in the northern city, opening fire at the Central Bank's branch, an ISF station and an army patrol.