NEW YORK — Two dozen bug bombs may have been set off at once inside a Chinatown beauty salon, leading to an explosion and fire that injured a dozen people, fire officials said Friday.

Three people remained hospitalized in serious condition Friday. Nine others suffered burns and smoke inhalation in the Thursday blaze, including four firefighters.

Fire investigators received reports that 24 pesticide cans, which release gas to kill bugs, were deployed at once in the first-floor beauty salon of the five-story brick building. The poisonous flammable fumes ignited, possibly from a pilot light or a spark from an electrical appliance. Fire officials were still investigating the blaze but believe it was accidental, spokesman James Long said.

Bug bombs, also known as foggers, are considered so poisonous and dangerous that New York City health officials have tried — so far unsuccessfully — to put restrictions in place so that only professional exterminators use the devices.

The devices cause between four and eight explosions every year in New York City, and about 300 nationally, according to the California Department of Pesticide Regulation and a 2009 letter to the U.S. Environmental Protection Agency from the city's director of poison control urging tighter restrictions on the pesticides.

"Failure to read, understand or follow label instructions is widespread," according to the letter. "The use of foggers results in regular catastrophic events."

Last year, the EPA made changes to bug bomb labeling that included pictures showing that multiple canisters shouldn't be used in a room, that ignition sources should be unplugged or turned off and that no pilot lights should be on.

In the explosion at 17 Pike St., fire officials believe "improper use" of the cans caused the blast that blew out a wall and caused the building to partially collapse. The fire broke out about 12:45 p.m. Thursday, with the explosion shattering windows on the first three floors. Officials did not say who they believe may have set the canisters off.

Tszkan Cheung, who had been in his fourth-floor apartment above the salon eating lunch at the time, described what he heard as "boom, like a bombing, like an earthquake."

He made it out of the building on his own but saw firefighters carrying out a woman with a severely injured leg.

Jinjoo Yang, who lives next door, said, "I heard a big sound. It sounded like something big fell from the next floor. I felt the whole floor shaking."

The department of buildings issued a vacate order for the building in part because of the fire, but also because of illegal partitioning on some of the floors. It wasn't clear how many people were living there but is not uncommon in New York to partition walls to make extra rooms, though owners are required to get permits to do so. Buildings investigators also found illegal plumbing and electrical work, said spokeswoman Kelly Magee.

The building owner Mary Shiu was issued a violation. She did not answer a call to her New Jersey home Friday.

The owners were last cited in 2009 for working without permits and failure to maintain the building, according to department of buildings records.

Building inspectors evacuated the structure for two months starting in January that year after it was found to be unsafe. Also in 2009, floors were rotted and in danger of collapsing and there were no fire-stopping materials. They paid $2,000 in fines and the complaints were resolved in March.