Boko Haram insurgents raided a border town and attacked another in Nigeria's Borno state, killing at least 12 people, military and vigilante sources said on Wednesday.
The town of Damasak, a few miles from the Niger border, had been recaptured from Boko Haram by Chadian and Nigerien troops in March but the insurgents have attacked it several times since.
Nigerien, Chadian and Nigerian security sources said that troops from the joint taskforce had recently withdrawn from Damasak. The insurgents attacked again before dawn on Tuesday, a military official and a vigilante leader in Maiduguri said.
"They burned houses and killed people but we don't have figures. We withdrew from Damasak a few days ago because civilians came back but the Nigerian army never came to occupy the town. The Chadian troops are now in Diffa in Niger," a Chadian security source said.
The Nigerian vigilante leader said few residents remained as they fled the moment the troops left, fearing an attack.
Boko Haram also attacked the hamlet of Warsala on Tuesday night, on the outskirts of Ngamdu, a town at the border of Yobe and Borno states.
At least 12 people were killed, according to a second military source and a bus driver from the village.
"Boko Haram also burnt down all the houses, cars and other vehicles including two trailers," bus driver Bukar Aji said.
Boko Haram has been trying to carve out a state in Nigeria's northeast adhering to its interpretation of sharia law for the last six years. In March, it pledged allegiance to Islamic State, which has taken control of territory in Syria and Iraq.
With the help of regional forces, Nigeria managed to push the militants out of most of the territory it overran in 2014.
At the end of April, Nigeria's army began a ground offensive into the vast Sambisa forest reserve in Borno state where they had been largely cornered.
But although the army destroyed many camps and rescued nearly a thousand people from captivity in the forest, the militants have dispersed as predicted by many diplomats and security analysts and resorted to their old guerrilla tactics of hitting soft targets.
The multi-national joint taskforce involves Niger, Chad and Cameroon as well as Nigeria. Under former President Goodluck Jonathan, relations with Chad were fraught as the Nigerian army was repeatedly criticized for not pulling its weight or communicating.
Since President Muhammadu Buhari came to power at the end of May, he has prioritized smoothing over the tensions and re-establishing Nigeria as the leader in the fight. New taskforce headquarters are being set up in Chad's capital N'Djamena.