Suspected Boko Haram jihadists using guns and explosives blasted their way into a prison near Nigeria's capital, freeing dozens of their jailed comrades and hundreds of other inmates, the government said on Wednesday.
Tuesday night's brazen attack on the outskirts of Abuja came just hours after an ambush on a presidential security convoy in the northwest, in a startling illustration of Nigeria's security challenges.
Residents reported a series of loud explosions and gunfire late Tuesday around the Kuje medium-security prison just 40 km (25 miles) away from the capital and the Aso Rock presidential villa.
President Muhammadu Buhari on Wednesday briefly visited the prison, where the burnt-out wreckage of a bus and cars marked the scene of the attack, and yellow police tape was stretched across a destroyed section of the prison perimeter.
"We understand they are Boko Haram, they came specifically for their co-conspirators," senior interior ministry official Shuaibu Belgore told reporters on a visit to the prison.
One security official was killed when the gunmen breached the jail using high-grade explosives.
Close to 600 inmates had been recaptured by Wednesday evening while less than 100 were still on the run, Nigeria's correctional services spokesman Abubakar Umar said.
Boko Haram is one of the jihadist groups involved in Nigeria's grinding 13-year conflict in the country's northeast.
Nigerian officials sometimes also use "Boko Haram" as a general phrase to refer to jihadists or other armed groups.
Defence Minister Bashir Magashi told reporters that Boko Haram militants had "mostly likely" carried out the attack and that all 64 jailed jihadists in the prison had escaped.
"None of them are inside the prison, they have all escaped," he said.
Commanders of another jihadist group Ansaru, including the group's chief Khalid Barnawi, had also been kept in Kuje prison since their conviction in 2017.
"We heard shooting on my street. We thought it was armed robbers," one local Kuje resident said. "The first explosion came after the shooting. Then a second one sounded and then a third."
Some prisoners surrendered while others were recaptured with military roadblocks set up around the penitentiary, officials said.
Security forces sent back around 19 recaptured inmates in a black van on Wednesday morning, an AFP correspondent at the site said.
Former top police commander Abba Kyari, who was being held in Kuje awaiting trial in a high-profile drug smuggling case, was still in custody, Umar said.
Nigeria's security forces are battling Boko Haram and Islamic State West Africa Province (ISWAP) jihadists in the country's northeast, where the conflict has killed 40,000 people and displaced 2.2 million more.
The overstretched military is also fighting heavily armed criminal gangs known locally as bandits who terrorise communities in northwest and central states with raids and mass kidnappings for ransom.
In the country's southeast, troops are dealing with separatist militias who demand an independent territory for the local ethnic Igbo people.
The Kuje prison raid took place soon after gunmen also ambushed an advance presidential security detail preparing for Buhari's visit to his home state of northwestern Katsina.
Buhari was not in the convoy, but two officials were slightly wounded in the attack. It was not clear who was responsible.
"The attackers opened fire on the convoy from ambush positions but were repelled," the presidency said in a statement.
Attacks on prisons in Nigeria have happened in the past, with gunmen seeking to free inmates.
More than 1,800 prisoners escaped last year after heavily armed men attacked a prison in southeast Nigeria using explosives.
The attackers blasted their way into the Owerri prison in Imo state, engaging guards in a gun battle before storming the prison. Imo state lies in a region that is a hotbed for separatist groups.