The army said Mohamed Hamza, a fugitive wanted in connection with militant activity in the northern city of Tripoli, had tossed grenades at troops as they sought to arrest him in the village of Deir Ammar.
"One of them exploded, injuring seven soldiers... After which he detonated an explosive belt, killing himself and two relatives, and injuring others," the army statement said.
A security source said the two others killed were Hamza's mother and niece.
The army said Hamza was wanted in connection with several incidents in which gunmen opened fire on soldiers and civilians in Tripoli.
Gunmen in the Bab el-Tebbaneh district of the coastal city often clash with others in the neighbouring Alawite district of Jabal Mohsen as well as fire on army patrols.
The army launched a security plan in April 2014 in an effort to stabilise Tripoli, which has seen successive rounds of deadly fighting between the two neighbourhoods.