"We retrieved 18 dead bodies from the scene and many people with injuries," Danlami Ajaokuta said of the explosion on the city's Baga Road, which happened at about 5:30 pm (1630 GMT) today.
Explosives are believed to have been left near a garage opposite a military unit, with many of the victims roadside mechanics taking a break from work.
At least six people who died were recovered in the immediate aftermath, Ajaokuta said yesterday.
"The death toll may rise further," he added.
More From This Section
There was no immediate claim of responsibility for the blast but Maiduguri has been hit repeatedly by Boko Haram Islamists, including in recent days.
Early on Saturday morning, Boko Haram fighters shelled the city but were repelled by the military and a suicide bomber later killed 26 at a mosque.
On Tuesday morning, suburbs again came under fire from rocket-propelled grenades and at least 13 people were killed in a suicide attack at a cattle market.
There were no immediate indications of casualties.
Boko Haram, which was founded in Maiduguri in 2002, has been pushed out of captured territory and towns in northeast Nigeria by a coalition of troops from Nigeria, Niger, Chad and Cameroon.
But sporadic attacks continue. Nigeria's new President Muhammadu Buhari has made ending the six-year insurgency a priority for his administration.