A "large number of gunmen" have attacked a Nigerian police base in the capital, Abuja, where Boko Haram militants are often held, police say.
A police statement said the attack was repelled but that 30 detainees escaped, 25 of whom were recaptured.
None of those who escaped were held on terror-related charges, it said.
No group has said it carried out this attack but Boko Haram Islamist militants have staged numerous attacks in Nigeria in recent years.
The group wants to establish Islamic law in Nigeria and has killed hundreds of people this year, mostly in the mainly Muslim north.
The attack on the Special Anti-Robbery Squad (Sars) headquarters in Abuja comes a day after a double suicide bombing killed 11 people in a church inside a military barracks in Kaduna state, north of the capital.
The Sars base is near several government buildings and security is normally extremely tight in the area.
One Abuja resident said he heard gunfire for about half an hour in the early hours of Monday morning.
The suspects escaped during the confusion of the attack, the police statement said.
It said those who remain at large had been held on suspicion of robbery.
It also stressed that no explosive devices were used during the attack.
An AFP journalist at the Sars headquarters says there are no visible signs of damage to the building, which is heavily guarded with two armoured vehicles outside.
It is where suspects are held when they are first transferred to the capital.
While most Boko Haram attacks are carried out in the north, it has previously targeted Abuja.
Last year, a suicide bomber from the group attacked the main police headquarters in the capital killing six people.
The militants have also previously attacked prisons and freed hundreds of suspected Boko Haram members.