A lone gunman killed four members of Lebanon's security forces in the city of Tripoli on Monday night before blowing himself up, state media report.
Two police officers and two soldiers died after the man fired at a bank, a police station and an army vehicle.
He detonated an explosive vest after being surrounded in a flat by troops.
No group has said it was behind the attack, but the gunman is reported to have been a member of the jihadist group Islamic State (IS).
The army identified him as Abdul Rahman Mabsout, who LBC television said was detained when he returned from Syria in 2016 and was freed the following year.
Security had earlier been increased across the country in preparation for Eid al-Fitr, the festival marking the end of the Islamic holy month of Ramadan.
Read more: BBC News
