The military government in Niger says it has foiled an attempt by the deposed former President, Mohamed Bazoum, to escape from custody.
The former president attempted to flee in the night with his family, cooks and security, a military spokesman said.
There were plans for the group to fly out on helicopters but the plan was foiled, he added.
Mr Bazoum has been under house arrest since members of his presidential guard staged a coup in late July.
Niger is part of the African region known as the Sahel – a belt of semi-arid land that stretches from the Atlantic Ocean to the Red Sea, just south of the Sahara Desert. The area is plagued by jihadists and beset by military regimes.
The attempted escape happened at around 03:00 (02:00 GMT) on Thursday, military spokesman Amadou Abdramane said on state television.
“The ousted President Mohamed Bazoum and his family, his two cooks and two security elements, tried to escape from his place of detention,” he said.
The escape bid failed and “the main actors and some of the accomplices” were arrested, he added.
The elaborate plan involved Mr Bazoum getting to a hideout on the outskirts of the capital Niamey, Mr Abdramane said.
The group had then planned to fly out on helicopters “belonging to a foreign power” towards Nigeria, he added, denouncing Mr Bazoum’s “irresponsible attitude”.
It is not clear where the former president and the rest of the group are now being held. An investigation has been launched.
The Niger military overthrew the democratically elected president in a coup on 26 July.
It mirrored similar military takeovers in neighbouring Burkina Faso and Mali, amid an Islamist insurgency and a growing Russian influence in the wider Sahel region through its mercenary group Wagner.
Mr Bazoum has refused to officially resign.
Despite his captivity, he was able to publish an article in The Washington Post stating that he was a hostage and that the coup would have “devastating consequences for our country, our region and the entire world”.
Soon after Mr Bazoum’s overthrow, US President Joe Biden called for him to be “immediately released”, and for the “preservation of Niger’s hard-earned democracy”.
That followed the expiration of a deadline by Ecowas, a power bloc of West African states, for the coup leaders to stand down.
Its threats of military intervention were not followed through, and the junta continues to ignore demands for the president’s freedom.
Mr Bazoum’s party and family members say he has had no access to running water, electricity or fresh goods.