Suspected Boko Haram militants launched an attack on the prison in the southern Niger town of Diffa late on Saturday, military sources said.
Diffa is a town in the extreme southeast of Niger, near the country’s border with Nigeria.
Rueters reports that the sect had tried to free fellow members in the facility.
Three of the assailants and one soldier were killed before the attack was repelled, the sources said.
Boko Haram had in February attacked the same prison;
“When the attack was repelled, the assailants fled, probably back into the town,” one military source said. “We are searching for them.”
A second military source said the attackers may have been residents of Diffa, as no one had seen them enter the town.
Boko Haram have been carrying out an average of one attack per day since late May.
Military authorities are yet to comment on the failed prison attack.