"Around 10 armed assailants tried to attack the prison at around 1600 GMT but were repelled because the security forces were already aware of an impending raid," a security source told AFP.
"There are no deaths in our ranks for the moment," Bazoum said.
The Koutoukale prison, some 50 kilometres (30 miles) north of Niamey, holds many militants.
The security source said the assailants infiltrated the Koutoukale market to launch their attempt on the prison.
The prison was previously attacked in October 2016 by assailants aboard motorbikes wielding explosives.
Considered to be Niger's most secure prison, the facility holds the country's most dangerous detainees, including militants from groups active in the Sahel area and Islamist militants from Nigeria's Boko Haram.
It also holds security prisoners from neighbouring Mali.
Niger, along with Chad and Cameroon, suffers from the spillover of Boko Haram's decade-long uprising to establish a hardline Islamic state in Nigeria's northeast.
The conflict has killed more than 27,000 people and left 1.8 million homeless.