The government of Mexico State, which surrounds the capital, reported on its online information portal that a male victim died at the scene of Thursday's blast in Zumpango and a female victim died at a hospital.
In an update Friday, it said the unidentified third victim had suffered severe burns and was in "very serious condition" at a hospital.
Dramatic video captured by a state government security camera at a distance from the explosion showed an intense orange fireball rising above the trees, individual fireworks popping off in bright flashes and a plume of smoke billowing into the sky.
The surrounding residential area was temporarily evacuated as a precaution.
That part of greater Mexico City is known for its fireworks manufacturing, a cornerstone of the local economy — and also for the dozens of accidents each year in which warehouses, markets and home fireworks stashes erupt, often with deadly results.
In 2016 the open-air San Pablito market in Tultepec, Mexico State, was destroyed by a spectacular chain reaction of flames and rockets that killed at least 42 people just days before Christmas.