Suspected Boko Haram gunmen killed 37 people in raids on five villages around Maiduguri, the capital of northeast Nigeria's Borno state, a military source and a local village defence group said on Friday.
The Islamist militants, who arrived on motorcycles and in four-wheel drive vehicles, fired into houses and shot fleeing locals during Wednesday evening and the early hours of Thursday, the military source said.
Malum Idrissa, a member of a village defence group known locally as the Civilian Joint Task Force, also told Reuters the death toll was 37 and said the villages were around 90 km (56 miles) from Maiduguri.
Details of the attack emerged a day after new President Muhammadu Buhari held a summit with regional counterparts to set up a joint military force to counter Boko Haram.
The militant Islamist group has killed thousands and left around 1.5 million displaced during a six-year insurgency during which it has tried to create an Islamic caliphate in the northeast of Africa's most populous nation and top oil exporter.
Maiduguri, the city closest to the scene of the attacks, this week became the new site of the Nigerian military command centre for operations to fight Boko Haram.
More than 80 people were killed in bomb blasts in the city last week, amid a resurgence in activity by the insurgents.