KADUNA, Nigeria — It was a particularly brutal raid, the kind that had become rare in recent months. Dozens of homes were burned to the ground. Children were abducted and carried off into the bush. People seeking refuge under a familiar tree were blown up by a suicide bomber who had infiltrated their ranks.

The suspected perpetrator is a familiar foe to this part of northeastern Nigeria: Boko Haram, the militant Islamic group that has carried out dozens of attacks across the region in recent years. On Monday, government officials raised the death toll of the weekend rampage to 65 people, with twice that number injured. Residents of Dalori, the site of the latest attack, said the death toll was even higher, with as many as 100 dead.

Boko Haram has marauded across northern Nigeria for years, killing thousands of civilians, burning entire villages and kidnapping hundreds of women and girls — crimes that came long before the group declared allegiance to the Islamic State last year.

Nigeria and its neighbors have struck back, chasing the militants out of villages they had seized. The military campaign has been so effective, according to Nigeria’s president, Muhammadu Buhari, that he recently declared the group “technically” defeated. His key evidence: the military had reclaimed territory from fighters in northern Nigeria roughly the size of the state of Maryland.

Even so, the group has launched attacks at a relentless pace across northern Nigeria and neighboring countries in recent weeks, including an assault in Maiduguri, the capital of Borno State, in late December. But its recent attacks, while deadly, have been relatively simple, carried out by suicide bombers who often hide explosives under religious gowns or in bags of vegetables. Mr. Buhari’s supporters cite the tactic as evidence that the group is grasping for relevance after being scattered by the military.

Then, over the weekend, the group appeared to go back to its old playbook: storming a town with multiple fighters and leaving a path of destruction. Militants descended on Dalori, a small village just outside of Maiduguri, on Saturday evening, unleashing a torrent of gunfire and setting homes ablaze as suicide bombers attacked fleeing residents, according to witnesses and officials.

And while government and military officials maintain that they have wrested control of territory from Boko Haram, a handful of people have been showing up in Maiduguri recently, saying their villages have been overtaken as well. Analysts warn that the war against Boko Haram may have shifted, but it is far from over.

Residents point to painful reminders that the group is very much alive. The nearly 300 schoolgirls it abducted from the village of Chibok in 2014 are still missing, they note, and neither the government nor the military know where they are.

This weekend in Dalori, witnesses said that fighters rampaged through the village for hours, and some residents complained that the authorities had not arrived fast enough to help fight the attackers.

In a news release, military officials reassured residents “of the commitment of the military to apprehend and deal with the perpetrators.” Hours before the attack this weekend, the military announced several aerial bombings of the Sambisa Forest, where fighters are believed to be hiding.

The challenge comes at a particularly bad time for Nigeria. The country faces mounting economic problems because of the falling price of oil, on which its economy is heavily reliant, and it will need to find a way to deal with major budget gaps.