Soldiers on Saturday detonated two homemade bombs found in a camp housing people displaced by Boko Haram violence in Maiduguri.
Two men suspected of planting the explosives were arrested and an investigation is ongoing, they said.
The bombs were found in the city’s Yerwa Primary School, prompting panic until soldiers destroyed the bombs from a distance.
The school was converted into a camp for Internally Displaced Persons (IDP) after Boko Haram Islamists captured the town of Bama, some 70 kilometres (43 miles) from Maiduguri, last July.
“Two improvised bombs were found in Yerwa primary school IDP camp by the people who notified soldiers stationed nearby,” local vigilante Ari Butari said.
“The soldiers asked people to evacuate before shooting the bombs from a distance, triggering two explosions that didn’t harm anyone,” he said.
“Two men were arrested on accusation that they were involved in planting the bombs. They drew suspicion because they were not known to be living in the camp,” he added.
Butari accused Boko Haram of being behind the foiled bomb attack.
His account was supported by Suleiman Yusuf, an IDP staying in the camp.
“Some people saw two abandoned black polythene bags and called the attention of our leaders in the camp who in turn informed security personnel,” Yusuf said.
“The bags turned out to be containing bombs and the soldiers asked everyone to stay clear of the bombs which they detonated from a distance,” he said. He confirmed that two men were detained after raising suspicions.
“Everyone is vigilant and once a new face shows up we all remain on the alert,” he said.
Scores of IDP camps dot Maiduguri following a huge influx of people fleeing towns and villages seized by Boko Haram, doubling the population of the city which stood at around one million people.
This is believed to be the first foiled attempt to attack any of the camps in the city.
The six-year-old Boko Haram insurgency has killed some 13,000 people and displaced 1.5 million in Nigeria and neighbouring countries.