The Nigerian military says it has repelled an assault by Islamist insurgents in northeastern Borno state.
The military says on its Twitter feed that soldiers pushed back a "terrorist attack" early Wednesday on the town of Biu. It says troops are in pursuit of the attackers after capturing five gunmen and two anti-aircraft guns.
Residents say Boko Haram fighters invaded the town in pickup trucks and motorcycles but were intercepted by troops from a nearby army barracks. They say at least 17 of the militants were killed during a three-hour gunbattle.
“They came shouting 'Allahu Akbar' [God is greatest] and shooting everywhere, but confronted by the soldiers for three hours, most them were killed,” witness Mshelliza told Reuters news agency.
“At the moment only three escaped into the bush and are being pursued by the soldiers.”
A security source confirmed the events but had no further details.
The Nigerian army has struggled to contain Boko Haram, which now controls large areas of Borno state and seized a key base from the military in the town of Baga earlier this month.
The army says 150 people were killed in that fighting, while local officials put the death toll at 1,000 or more.
Boko Haram's dominance in the northeast and the ongoing violence have raised doubts about whether voting for next month's presidential election can take place in Borno and two neighboring states.
Growing insecurity linked to Islamist militants is a major issue for President Goodluck Jonathan a month before polls in which he faces a rival, Muhammadu Buhari, who was seen as tough on security when he was a military ruler in the 1980s.
The military did not immediately respond to a request for comment on what was the second attack on a major town by Boko Haram militants in the past two weeks.
The group's fighters seized the military base and town of Baga, on the shores of Lake Chad, on Jan. 3. Baga was the headquarters of a multinational force with troops from Chad, Niger and Cameroon. The militants have killed scores and razed dozens of homes there, with the military putting the death toll at 150, while some local officials have put it as high as 2,000.
The United States said on Tuesday it sees the Feb. 14 election in Nigeria, Africa's biggest economy, as a factor behind the sharp rise in attacks by Boko Haram, a group which has killed thousands since launching an uprising five years ago.
On Tuesday, a suicide bomber blew himself up outside a mosque in the northeastern city of Gombe, killing at least two other people and wounding 14 during prayers.
Some material for this report came from Reuters.