P. T. Chacko, a spokesman for Chief Minister Oommen Chandy of Kerala, said that the fireworks display had been specifically forbidden by officials in the coastal district of Kollam but that the Puttingal temple had gone ahead anyway.
One of the devices landed in the building where the fireworks were being stored, setting off explosions that leveled several buildings, killing and injuring people, K.Hari Kumar, a fire officer at the scene, said in a telephone interview.
“Fragments of the building with huge pieces of burnt crackers were flying all over,” said Rajendran, 36, a mason who goes by one name. He had traveled with friends from his village 20 miles away to attend the festivities, which marked the start of the new year on the Hindu calendar.
“We all started scrambling for a safe place,” Mr. Rajendran said by telephone from his bed in an intensive care unit at the nearby Holy Cross Super Specialty Hospital, where he was taken with broken bones in his face and in one arm. His friends were so badly burned, he said, that he did not know if they would survive.
Public safety is a huge problem in India, where weak governance frequently results in the flouting of safety rules, leading to large numbers of fatalities. At least 26 people died and 89 were injured when an elevated highway under construction collapsed in late March in a crowded neighborhood in Kolkata.
K. M. Singh, a former member of the National Disaster Management Authority and a retired government official, said public safety was not treated as a top priority. Punishments for violating safety rules are not a sufficient deterrent, he added, because cases drag on for years in the overcrowded courts, and in the end the accused often are not penalized.
“It needs a total mind-set change from top to bottom,” Mr. Singh said. “The situation will not change unless the government enforces the norms in a very undiluted manner and takes serious punitive action wherever there are violations.”
Fireworks have become increasingly popular at religious festivals in India, set off by children and adults in streets and in parking lots, as well as on temple grounds. Religious groups and temples, flush with donations, compete to create the loudest, brightest displays. Accidents are common, though the scale of devastation on Sunday was unusual.
Hours after the explosions on Sunday, the police in Kerala opened an official criminal investigation of two top temple officials, Mr. Chacko said. The two officials, P. S. Jayalal, the temple president, and J. KrishnanKutty Pillai, the temple secretary, could not be reached immediately for comment.
S. Chandrakumar, a police inspector in the temple town, said the police had begun investigations of 17 people, including the temple leadership, on allegations ranging from culpable homicide to violating the orders of a local authority.
Also on Sunday, the Kerala government ordered a judicial inquiry into the temple deaths, which must be completed within six months.
Mr. Chacko said 106 people had died and 383 others were hospitalized and being treated for burns. The medical officer of Kollam, Dr. C. R. Jaysankar, said many of the deaths occurred when pieces of concrete, knocked loose by the explosions, fell on members of the crowd.
Some of the dead were burned so badly that they were unrecognizable, according to a statement from Thiruvananthapuram Medical College, which received some of the first victims.
The explosions began around 3 a.m., and rescue operations were still underway as of 9:30 a.m., with some people still trapped, Mr. Kumar, the fire officer, said. The force of the explosions caused buildings and electrical lines to collapse as far as 50 feet away, he said.
Neethu Reghukumar, a CNN-IBN television reporter at the scene, said by telephone that the fireworks were being set off in a small area next to the temple, less than 300 feet away from houses, when high-intensity fireworks being stored in a concrete building inside the temple premises caught fire after one of the devices landed there. A huge explosion brought down the building, and an adjacent building also collapsed, Ms. Reghukumar said.
Many houses in the vicinity were damaged, their windows, doors and walls cracked, she said. The explosions also tore apart bodies, witnesses said in television interviews. One woman interviewed on CNN-IBN described finding human remains inside her house and on the roof.
Prime Minister Narendra Modi commented on the episode on Twitter, saying, “Fire at temple in Kollam is heart-rending & shocking beyond words.” Television stations showed Mr. Modi arriving in Kerala on Sunday afternoon and heading to visit the vicinity of the temple and victims in hospitals.
The Puttingal temple is about 40 miles from the state capital, Thiruvananthapuram. Local residents believe that a goddess appeared on an ant hill that is now the site of the Hindu temple.