MUBI, Nigeria -- With a military escort instead of the usual pomp, the Emir of Mubi was reinstalled Friday in his palace, where until recently flew the black-and-white flag of Nigeria's Islamic extremists, Boko Haram.
An army tank now guards Mubi's town gate, fortified by sandbags, as residents return from the mountain hideouts where they hid while their city was held for more than a month by the militants.
After weeks of setbacks and reports that soldiers ran away when Boko Haram attacked, Nigeria's military, including newly deployed Special Forces, have gone on the offensive and have recaptured some cities and towns that had been held by Boko Haram.
All is not yet back to normal in Mubi. Bodies of militants still litter one street -- testimony to hard fighting by Nigerian soldiers who won back the town a week ago. They were helped by air raids, traditional hunters armed with guns and spears as well as vigilantes carrying clubs prickling with nails and other homemade weapons.
The emir's cavalcade drove by bombed out buildings, burned out armoured personnel carriers, vandalized banks and government offices looted when the extremists seized the town in October. Banks are still shut and cellphone service is disconnected but the dozens of people who have returned home welcomed their traditional Muslim monarch, Emir Abubakar Isa Ahmadu.
"We appreciate the gallant efforts of the Nigerian military, hunters and vigilantes that saw the liberation of our towns," he told a handful of cheering supporters gathered to welcome him home.
Later, at Friday prayers, the ruler said he was optimistic that other centres in northeastern Nigeria will soon be won back from Boko Haram.
"As you can see, we have started opening our shops in a peaceful atmosphere," said market trader Malam Garba Musa. "This is a welcome development, because when the Boko Haram guys were having a field day, they could pounce on you callously at any time."
Mubi, a major commercial centre of more than 200,000 with an important cattle market that draws traders from across Nigeria's borders, is the biggest city to be recaptured. Others include Gombi, Hong and Maiha.
The militants are still attacking. Gajigana, a border town between Niger and Nigeria, was attacked by the extremists on Thursday and 11 people were killed. Major buildings were burned down but Boko Haram did not succeed in capturing the town.
Other cities and towns in the northeast remain controlled by Boko Haram who have forced young men to join their ranks, killed traditional, government and religious leaders and kidnapped scores of young women and girls. They have declared an Islamic caliphate in the large area they control and are enforcing their version of strict Shariah law, with public beheadings, amputations and whippings.
Thousands have been killed this year alone and tens of thousands driven from their homes in recent months, many sheltering in neighbouring Cameroon, Chad and Niger.
Halima Ibrahim's story is similar to many. She enjoyed a comfortable in Damassak town with her husband and seven children until the insurgents arrived on Nov. 24.
They shot her husband in front of her and took off with her two eldest girls, aged 11 and 12. She and her remaining children fled across the border to Niger, along with some 16,000 people from the Damassak, where they now live in a makeshift emergency camp at Gagamari village.
"I was there with my husband's body and with the children. They selected two of my children. What am I going to do?" Ibrahim, who is six months' pregnant, told aid workers from ECHO, the European Union humanitarian agency that delivered the first food for the refugees.
Many of the refugees are from families separated in the chaos of battle -- children who have lost their parents and parents searching for children, ECHO said.
The EU this week unblocked an additional 5 million euros to help some 1.6 million Nigerians forced from their homes by the Islamic insurgency. Niger declared a "humanitarian crisis" in the area, where refugees look across the river at a homemade black and white flag of Boko Haram painted with two assault rifles crossed over the Qur'an.