Suspected Islamist militants attacked a fishing settlement in northeast Nigeria over the weekend, killing 20 civilians, the military said on Sunday.
The assault targeted Baga, a town on the shores of Lake Chad, until recently a stronghold for Islamist sect Boko Haram.
A concerted military crackdown in the northeast since mid-May has weakened the four-year-old insurgency, which is fighting to carve an Islamic state out of religiously-mixed Nigeria.
But it has also pushed the militants into hiding, mostly along a mountainous area near the Cameroon border, intelligence sources say, from where they can launch devastating attacks.
"The sect members came armed and started shooting sporadically, killing 20 civilians," said Lieutenant Haruna Sani, spokesman for the multinational force of soldiers from Niger, Chad and Nigeria tasked with security along Nigeria's porous northeastern borders. The attack was on Saturday.
Baga was the scene of a clash between the multinational force and the Islamists that killed dozens of people in April - the army said 37 people were killed, but local leaders said around 185, most of them civilians, died in the violence.
President Goodluck Jonathan declared a state of emergency in Borno, Yobe and Adamawa states on May 14, ordering in extra troops. Nigerian forces say their offensive has enabled them to wrest back control of the remote northeast, destroy important bases and arrest hundreds of suspected insurgents.
In response, the sect has turned its attention to civilians. Boko Haram - whose name roughly translates as 'Western education is sinful' - has attacked at least four schools there over the past month, killings dozens of pupils.
Civilian vigilantes have sprung up, helping Nigerian forces to identify and arrest Boko Haram members.
Some have been killed in retaliation.
Lieutenant Colonel Sagir Musa, spokesman for Nigerian forces in Borno state, where Baga and Maiduguri lie, said one vigilante youth was killed and one wounded in the village of Mainok.