Nigeria's secret police said on Sunday there had been an escape attempt by detainees at their headquarters, with unconfirmed reports that Boko Haram militants were involved.
Department of State Services (DSS) spokeswoman Marilyn Ogar said the incident happened at 7:15 am (0615 GMT) when one of its officers went to feed the detainees.
"One of the suspects attempted to disarm him by hitting him at the back of his head with his handcuff," she said in an emailed statement.
"His attempt to escape drew the attention of other guards at the facility who fired some shots to warn and deter others."
Ogar did not provide details on the number of inmates involved nor disclose why they were being held but said further details would be released later.
The DSS headquarters in the capital Abuja are near the presidential villa and nearby residents reported hearing gunfire on Sunday morning. Traffic was also diverted in the area.
"The gun shots attracted the attention of the military with whom we have an understanding of mutual assistance in the event of any threat," Ogar went on.
"The Army immediately deployed a team to reinforce our perimeter guards to forestall any external collaborators. The situation has since been brought under control."
A security source told AFP the officer involved was shot with his own rifle after the inmates seized the weapon. His condition was not immediately known.
A number of Nigerian newspaper websites and users of social media claimed that the detainees were Boko Haram suspects but did not quote sources.
The DSS had on March 3 paraded seven suspected Boko Haram members arrested on suspicion of killing a prominent Muslim cleric who had criticised the group before the media at their headquarters.
The seven were held over the murder of Adam Albani in the northern city of Zaria on February 1.
But it was not known whether the men, including the alleged mastermind of the attack and one of the gunmen, were still at the facility.
In the first three months of this year, the Boko Haram insurgency, which began in 2009, has seen more than 1,000 people killed and some 250,000 displaced in the three northeastern states worst affected by the violence.