An official said explosives that were fired from outside the city "landed on separate sites."
Suspected militants have attacked the city of Maiduguri, one of the last safe havens in northeastern Nigeria, killing four civilians.
"Three rocket-propelled explosives were fired from outside the city and landed on separate sites, killing four people and injuring three" as residents were preparing for Eid celebrations, Bello Danbatta, head of security for the Borno State Emergency Management Agency (SEMA) said on Thursday.
"It is certainly the handiwork of the 'terrorists' who are bent on disrupting Eid festivities tomorrow," said Ibrahim Liman, an official with one of the civilian militias which back up the military in the fight against the militants.
"They fired the bombs from the edge of the city to cause destruction and create panic," he added.
Nigeria a no-go area
Maiduguri is the capital of Borno state, the birth place of the Boko Haram group in 2009.
Boko Haram has repeatedly attacked the town, home to several million people, while large swathes of northeastern Nigeria have become a no-go area because of the presence of militant groups.
Boko Haram is one of the most feared groups and it has gradually spread into neighbouring Cameroon and Chad.
More than 36,000 people have died in fighting since 2009, with more than two million unable to return to their homes, many of them finding some refuge in Maiduguri.