By NBC News and The Associated Press

An explosion blasted Mexico's best-known fireworks market Tuesday on the northern outskirts of Mexico City, the capital, killing 31 people and injuring 72 others while sending a huge plume of charcoal-gray smoke into the sky, officials said.

The explosion, which wasn't being linked to terrorism, happened at the open-air San Pablito Market in Tultepec, in the State of Mexico.

Local authorities said Wednesday that the death toll had increased to 31. Earlier, Eruviel Ávila Villegas, governor of the State of Mexico, said at a news conference that 26 people were killed at the scene and that three more died later in the hospital.

PHOTOS: Mexicans Survey Devastation After Deadly Fireworks Explosion

Images from the scene showed smoke rising from the scorched ground and fireworks stands. Emergency crews were attending to victims and hosing down hotspots.

Mercado del cuete en Tultepec acaba de explotar @JesusMartinMx pic.twitter.com/sdEWNCGOAm — Alberto Moreno (@beto150482) December 20, 2016

Federal police said on Twitter that they were working with other authorities to help the injured. They asked people near the "risk zone" in Tultepec to follow directions from specialized personnel.

Smoke billows over the San Pablito fireworks market Tuesday on the northern outskirts of Mexico City. Orlando Ruiz / Twitter

The national coordinator for civil protection, Luís Felipe Puente, said some nearby homes were also damaged. The scene remained dangerous, and he asked people not to venture within 3 miles to avoid danger or hampering the emergency response. Puente added that there was no choice but to let any unexploded fireworks burn off.

Related: Fourth of July Firework Sales Hit New Highs as Bans Fall

A fire engulfed the same market in 2005, touching off a chain of explosions that leveled hundreds of stalls just ahead of Mexico's Independence Day. A similar fire at the San Pablito Market also destroyed hundreds of stands in September 2006.

Many in Mexico traditionally celebrate holidays — including Christmas and New Year's — by setting off noisy firecrackers and rockets.