The Nigerian army has repelled an attempt by jihadist group Boko Haram to seize the northeastern town of Magumeri, a spokesperson said on Sunday, a day after the attack.
The assault is the latest in a series of attacks in the northeast region of the country.
Reuters reports the military spokesperson to say that three soldiers were killed and six others wounded while fighting the militants in Magumeri, which lies 50 km (30 miles) from Borno state capital Maiduguri.
Borno state has been the center of the conflict through the years.
Boko Haram has waged a near decade war in Nigeria, seeking to topple the government and install a strict sharia-based system of governance.
The war has killed thousands and displaced millions others, and continues to drag on.
A suicide bomber killed at least 58 people on Tuesday at a mosque in neighbouring Adamawa state, one of the deadliest attacks since President Muhammadu Buhari came to power in 2015 pledging to end the Boko Haram insurgency.
While gains have been made in pushing the militants out of their bases, they still manage to stage attacks across the Lake Chad region.