Nigerian troops have repelled a Boko Haram attack on the north-east city of Gombe, officials say.
Soldiers and a fighter jet were used in a counter-attack after Islamist fighters overran a checkpoint on the edge of the city.
The insurgents were retreating towards their stronghold in the neighbouring state of Borno, witnesses said.
Nigeria postponed elections due to be held on Saturday due to the insurgency in the north-east.
Before they left, the militants scattered leaflets urging people not to vote in the elections.
All roads in and out of Gombe have been blocked and a 24-hour curfew imposed, reports the BBC’s Abdullahi Kaura Abubakar in Abuja.
Gombe – capital of Gombe State – has previously suffered suicide attacks but correspondents say this was the first time Boko Haram launched a direct assault on the city.
Reports said militants first attacked the town of Dadin Kowa, about 40km (25 miles) from Gombe.
Ground troops with air support then battled to keep the insurgents from entering the city, as residents fled into the bush and nearby hills.
Boko Haram controls a swathe of territory in north-eastern Nigeria.
Its insurgency has become a regional crisis with the four affected countries – Nigeria, Niger, Chad and Cameroon -agreeing to form a regional military force to try to contain the threat.
In response, the insurgents have stepped up their attacks in Nigeria and neighbouring states.
It emerged on Friday that Boko Haram had attacked Chad for the first time, crossing Lake Chad in four motorboats and raiding a village overnight.
Security sources and witnesses said five people were killed by Boko Haram in the village of Ngouboua, including a local chief, a police officer and three civilians. The Chadian military said two of the attackers were also killed.
Some reports put the civilian death toll higher.
Villagers said about 30 militants took part in the attack, setting fire to two-thirds of homes.
Boko Haram, which wants to create an Islamic caliphate in Nigeria, has killed thousands and forced millions to flee their homes in north-east Nigeria since 2009.
- Founded in 2002, initially focused on opposing Western education – Boko Haram means “Western education is forbidden” in the Hausa language
- Launched military operations in 2009 to create Islamic state
- Thousands killed, mostly in north-eastern Nigeria – also attacked police and UN headquarters in capital, Abuja
- Abducted hundreds, including at least 200 schoolgirls
- Controls several north-eastern towns
- Launched attacks against neighbouring Niger and Cameroon in 2015
Source : BBC