Armed men from Nigeria's Boko Haram group have attacked the northeastern town of Bama, opening fire on a school, shooting or burning to death 47 people and trashing the palace of a traditional ruler, according to officials and witnesses.
The death toll was confirmed by Lawal Tanko, police commissioner for Borno state, which lies at the heart of an insurgency that has killed thousands in the past four and half years.
Many more were wounded in Wednesday's attack, he said.
He said the assailants had also partly burned down the palace of the traditional ruler of Borno, whose kingdom was one of West Africa's oldest medieval Islamic caliphates.
Boko Haram killed 106 people in Ighze village on Sunday, according to official figures, making it one of their deadliest assaults so far.
That prompted the Borno state governor to say the rebels were better armed and motivated than government forces.
The military denied that Boko Haram were better armed or motivated and said it was making progress, but that no country facing terrorism had defeated it completely.
President Goodluck Jonathan ordered extra troops into northeast Nigeria in May to crush Boko Haram, which opposes Western influence and wants to create a state ruled by Islamic law in the country's largely Muslim north.
However, the offensive, backed by air power, has so far failed.
The fighters have retreated into the remote, hilly Gwoza area bordering Cameroon, from where they mount deadly attacks against civilians they accuse of being pro-government, and are abducting scores of girls.
Earlier on Wednesday, Boko Haram fighters attacked the house of an army general in the village of Buratai in Borno state, killing a soldier guarding it, Tanko said.
He said General Umar Tukur Buratai, who is stationed in the southern Niger Delta, was not there at the time of the assault, which had inflicted "minimal damage".
The attacks came as Abubakar Shekau, Boko Haram's reputed leader, threatened assaults in Nigeria's oil-rich Niger Delta region in a new video released on Wednesday.
"You will in coming days see your refinery bombed," Shekau warned in the 28-minute video obtained by the AFP news agency through the same channel as previous clips.
It is unclear when the video was recorded.
"Niger Delta, you are in trouble," Shekau said, speaking in Hausa, the dominant language in northern Nigeria.
The video was shot in an open field, where Shekau was surrounded by an armoured tank, two military vans and about a dozen gun-bearing soldiers.
Nigeria, Africa's largest oil producer, derives more than 90 percent of its foreign exchange earnings from oil.