An indefinite lockdown was ordered on three areas in northeast Nigeria on Sunday after troops battled scores of Boko Haram fighters outside the Bauchi state capital, Bauchi city, the authorities said.
Soldiers supported by two fighter jets intercepted the militants who were in 20 pick-up trucks at Dungulbe village, seven kilometres (four miles) from the city, and engaged them in fierce fighting.
"The fighter jets are pounding the enemy position while ground troops are engaging them," said a military officer in the city, who asked not to be identified, in an account supported by residents.
"The operation is still ongoing but the terrorists have suffered serious losses and are in disarray," the officer added.
The fighting took place as Nigeria held a second day of voting in its general election after technology failures hampered polling on Saturday.
A spokesman for the Bauchi state governor said an indefinite, round-the-clock curfew had been imposed on three areas because of the fighting.
"The state government has put a 24-hour curfew in Bauchi, Kirfi and Alkaleri local governments as a result of the security breach by Boko Haram," Danlami Baban-Takko said.
"The curfew was imposed indefinitely... to enable security agencies to restore normalcy in the affected areas.
"By this curfew, residents of the three affected local governments are to remain in their homes until further notice."
The main opposition All Progressives Congress (APC) candidate for the Bauchi state governorship, Mohammed Abullahi Abubakar, however, blamed the curfew on his political opponents.
"The curfew was only an attempt by the PDP (Peoples Democratic Party) to tinker with the results of the elections," he claimed.The Islamists arrived in Dungulbe at around 10:00 am (0900 GMT) and set up camp in preparation for an invasion of the city, said resident Mudassir Hambali, who fled to Bauchi.
"They came in 20 vehicles carrying heavy weapons. As soon as I realised what was happening I fled through the bus with my family.
"I saw a large convoy of soldiers heading towards the village while I and my family were trekking to Bauchi."
Anas Uballe, from Inkil village, two kilometres from Dungulbe, said: "I saw two military jets dropping bombs and the huge explosions terrified our village which forced us to move into the city."
The militants were believed to have come through the town of Alkaleri, 60 kilometres away, where there was a dawn raid on Saturday, according to the military source and residents who fled.
Gunmen in several vehicles attacked public buildings and security checkpoints.
A police station, the office of the paramilitary Nigeria Security and Civil Defence force and the local electoral commission premises were all burned to the ground.
"They moved to Bishi, 35 kilometres away, where they shot dead a man in his car on the highway," said Alkaleri resident Babale Shehu.
"They were no doubt the same gunmen that went to Dungulbe."
The gunmen also on Sunday attacked polling stations and destroyed ballot boxes in Bauchi, state police spokesman Haruna Mohammed said.
"Today... at about 0025 hours, unspecified numbers of unknown gunmen in a convoy of over 10 vehicles stormed many polling units in Kirfi... and destroyed many electoral materials," he said.
"(The) hoodlums further attacked Kirfi and Alkaleri Divisional Police Headquarters but were repelled and pursued towards Dindima town."
The police statement did not mention Boko Haram or the operation in Dungulbe, which comes after at least seven people were killed in suspected Boko Haram attacks in neighbouring Gombe state Saturday.
"The entire surroundings has been cordoned off by combined security forces and effort is being intensified to restore normalcy in the area," said Mohammed.