The bodies of 11 Nigerien soldiers missing since Tuesday's ambush have been discovered, bringing the death toll to 28.
Militants killed four US soldiers at the same place in 2017.
Niger and other countries in the Sahel have been facing a growing militant threat from several Islamist groups.
The Islamic State group has said it was behind the ambush but there has been no confirmation of this claim by the authorities.
Militants belonging to affiliates of al-Qaeda are also active in the region.
They are most active in neighbouring Mali, where French troops intervened in 2013 to prevent them from advancing on the capital, but they often stage cross-border raids.
How did the attack happen?
The soldiers were in pursuit of militants who attacked a high security prison 50km (30 miles) on Tuesday outside the capital, Niamey, a government spokesman told the BBC.
"One of the soldiers' vehicles drove into a landmine and then the assailants started firing at our soldiers," Mr Zakariyyah told the BBC's Focus on Africa programme on Tuesday.
It was initially reported that 17 soldiers had been killed in the ambush.
Without providing any evidence, the Islamic State group has claimed responsibility for the attack via its news agency Amaq. According to the statement, 40 were killed and injured, although for now the government has said that the death toll was 28.
Mr Zakariyyah did not identify the perpetrators of the attack but said it happened near where US troops and five Niger soldiers were killed two years ago.
A search operation, aided by French and American troops, who have a base in Niger, continues.
Niger is part of a five nation anti-insurgency force operating in the Sahel. It includes Burkina Faso, Chad, Mali and Mauritania.
The G5 Sahel, as it is called, is backed by a 3,000-strong French force.
Call to attack French allies
By Louise Dewast, BBC West Africa correspondent
This was the deadliest attack recorded in western Niger, where government troops and their international allies are fighting affiliates of al-Qaeda and the Islamic State group.
Authorities say it was a complex attack in which the militants planted improvised explosive devices. Despite years of heavy deployments of French, US and UN forces, the region - including Niger - remains a tinderbox.
The group called the Islamic State in the Greater Sahara (ISGS), which has claimed responsibility for the attack, has recently been subject to counter-militancy operations, mainly led by the French, making large-scale attacks against government troops difficult.
For one expert on the region, Héni Nsaibia, a researcher at The Armed Conflict Location and Event Data group, this attack could be the result of French forces shifting its focus to central Mali, and to the recent hostage-release operation in Burkina Faso which required attention and assets.
He adds it could also be that militants are heeding the call of Islamic State group leader Abu Bakr al-Baghdadi, who in a recent audiovisual speech explicitly called on them to intensify attacks against France and its allies in the Sahel region.
The statement released on Thursday was issued by the central Islamic State but is being attributed to its affiliate in the region. It is believed to be just the second official claim - in the form of a statement - from ISGS in the region.