Nigeria's military said on Sunday that it killed 20 Boko Haram Islamists while repelling an attack by the extremist group in the embattled northeastern state of Borno.
"Boko Haram terrorists attempted to attack a military barracks (in Borno) at about 5:00 am (0400 GMT)," spokesman Lieutenant Colonel Sagir Musa said in a statement.
He said the attack occurred in the village of Monguno, about 200 kilometres (124 miles) from Borno's restive capital of Maiduguri, considered Boko Haram's home base where the radical group has been blamed for scores of deadly attacks.
The raid on the military barracks "was repelled," Musa said. "The encounter led to the deaths of 20 Boko Haram terrorists." He made no mention of military casualties.
Musa said the gunmen, armed with Kalashnikovs and rocket-propelled grenade launchers, had stormed the military site in three 4X4 trucks and eight motorcycles.
Separately, two militants linked to a series of explosions in Maiduguri that injured four people last week have been arrested by the military, he added.
Boko Haram's insurgency is estimated to have left 3,000 people dead since 2009, including killings by the security forces.
The Islamists have said they are fighting to create an Islamic state in Nigeria's mainly Muslim north, but their demands have repeatedly shifted.
A video posted on YouTube last month featured gunmen claiming to be from Boko Haram who said they abducted a French family of seven from a Cameroon nature park near the Nigerian border.
The video marked a departure for the Islamist group, which had never before claimed the kidnapping of a Westerner and some have questioned whether the Nigerian Islamists did in fact carry out the abductions.
France has said that Boko Haram was responsible for the attack and are likely holding the family members, including four children, in Nigeria.
Boko Haram is believed to include a number of factions with varying degrees of coordination, and some criminal groups are suspected of carrying out attacks under the guise of belonging to the movement.
The main faction of the Islamist militia is thought to be led by Abubakar Shekau, who was designated a global terrorist by the United States last year.
Several experts have cast doubt on the suggestion that Shekau's faction was directly involved in the kidnapping of the French family.
Boko Haram has rarely attacked foreign targets, with most of its violence directed at Nigeria's security services, politicians and other symbols of authority.
Churches have also been repeatedly targeted in the country roughly divided between a mainly Muslim north and mostly Christian south.
Nigeria is Africa's most populous country and top oil producer, which has also seen waves of violence by militants and gangs in the oil-rich south.