By Lanre Ola
MAIDUGURI, Nigeria, Sept 2 (Reuters) - Islamist Boko Haram insurgents overran most of a northeastern Nigerian town on Tuesday after hours of fighting that killed scores and displaced thousands of residents, security sources said.
The Islamists launched an attack on the town of Bama, 70 km (45 miles) from the Borno state capital of Maiduguri, on Monday. They were initially repelled but came back in greater numbers overnight, the sources and witnesses said.
Nigerian defense spokesman did not respond to a request for comment. The sources said there were heavy casualties on both sides and one said at least 5,000 people fled the town.
In a bungled air strike, several Nigerian troops were killed at the Bama armory by a war plane targeting the insurgents, a soldier on the ground told Reuters.
Two months after Islamist militants in Iraq and Syria declared the area they seized an Islamic caliphate, Boko Haram has also for the first time explicitly laid claim to territory it says it controls in parts of northeast Nigeria.
They captured the remote hilly farming town of Gwoza, along the Cameroon border, during fighting last month. The group's leader Abubakar Shekau in a video declared it a "Muslim territory" that would be ruled by strict Islamic law.
Shekau's forces have killed thousands and displaced hundreds of thousands since launching an uprising in 2009 to revive a medieval Islamic caliphate in religiously mixed Nigeria. They are the biggest security threat to Africa's top oil producer.
"When we started hearing gunshots, everybody was confused. There was firing from different directions. We just ran to the outskirts of town," Bukar Auwalu, a trader who fled with his wife, three children and brother, told Reuters by phone.
"There were military helicopters and a fighter jet. We slept in the bush on the outskirts of town. We can't go back."
Adrian Edwards, spokesman for the United Nations High Commissioner for Refugees (UNHCR), said 9,000 people fleeing violence in Nigeria's northeast had arrived in Cameroon's Far North region in the past 10 days.
"Even upon arrival in Cameroon, they are not necessarily out of harm's way. On Sunday, insurgents attacked Kerawa town inside Cameroon, forcing refugees and some local residents to flee further inland," he said in a briefing note from Geneva.
Another 2,000 had crossed into Niger, which is already hosting some 50,000 refugees from fighting since May 2013. Some 645,000 people are internally displaced in Nigeria, she said.
Cameroon state radio said on Tuesday it had killed 40 Boko Haram insurgents during an an attempted incursion by the militants the previous day.
Because of Bama's proximity to Maiduguri, a metropolis and home to an army base, security officials are worried there is now little to keep Boko Haram from gaining access to a city that was also the birthplace of their movement.
The military has extended Maiduguri's nightly curfew to 7 p.m. (1800 GMT) until 6 a.m. - it previously started at 10 p.m. - to fight infiltration by insurgents, Nigerian defense headquarters said.
The insurgents have also been in control of a small town called Gamboru Ngala, on the shores of Lake Chad to the north, that they seized in August which potentially opens up two fronts for an attack on Maiduguri.
"Boko Haram are beginning to operate like a conventional army, a major change from... before July, when it focused on carrying out short-lived hit-and-run assaults," the Nigeria Security Network's Andrew Noakes said in a report on Tuesday.
"If Maiduguri falls, it will be a symbolic and strategic victory unparalleled so far in the conflict."
Boko Haram attracted the international spotlight on April 14, when it kidnapped more than 200 girls from a school in the northeast village of Chibok in April. They remain in captivity.
The apparent powerlessness of the military to protect civilians or prevent the militants' raids has triggered much criticism of President Goodluck Jonathan's administration.
A soldier involved in the Bama fighting, who declined to be named, said the insurgents had targeted the Bama armory with heavy weapons including tanks. As troops tried to repel the attack, they called in air reinforcements.
But by the time the war planes arrived, they had mostly lost the battle for this location. The jet then bombed the area but accidentally killed everyone there, both Nigerian troops and insurgents, the soldier said.
"The situation is bad. We lost so many of our men," he said.
Farmer Ibrahim Malu said hundreds had fled the town. He had gone out to his farm early in the morning when gunfire and loud explosions erupted. He ran back home, but by the time he got there his wife and children had already fled.
"I still don't even know where they could be," he told Reuters by telephone. "Two soldiers fled with me. One of them didn't even have any shoes." (Reporting by Lanre Ola; Additional reporting by Tim Cocks in Lagos, Emma Farge in Dakar and Tansa Musa in Yaounde; Writing by Tim Cocks, Editing by Angus MacSwan)