A major explosion and fire swept through a temple in southern India on Sunday killing 79 people after families and others had gathered for a fireworks display, a top official said.

More than 250 others were injured in the fire that engulfed the temple complex where hundreds had come together during the night for a festival celebrated in Kerala state marking the Hindu new year.

"I got the information that 79 persons are declared dead," Kerala Chief Minister Oommen Chandy told NDTV news network, after officials earlier put the number killed at more than 50.

Firefighters and police battled through the night at the Puttingal Devi temple in the coastal town of Paravur to douse the fire and rescue the injured.

Television footage showed a series of large explosions and fireworks erupting as plumes of smoke filled the night air after about 3am local time. The injured were also seen arriving at nearby hospitals in cars and in ambulances in chaotic scenes.

"Now the situation is under control... the police are on the spot," Kerala home minister Ramesh Chennithala told NDTV.

Prime Minister Narendra Modi expressed shock at the disaster, and said he was dispatching his health minister and he too would also fly to Kerala soon to "take stock of the situation".

"Fire at temple in Kollam is heart-rending & shocking beyond words. My thoughts are with families of the deceased & prayers with the injured," Modi tweeted.

"Arranging for immediate shifting of those critically injured via helicopter."

Chief Minister Chandy said the temple officials had gone ahead with the fireworks display despite being denied permission because of safety concerns.

"That is correct. District collector of Kollam denied sanction for this fireworks (display)," he said when asked after whether permission had been given.

The Kerala government ordered an inquiry into the cause of the fire, as a senior police officer said it is suspected to have started when sparks flew onto the fireworks lined up ready for the show.

"During the time of the fireworks, it is believe that a spark flew onto the panel where the pyrotechnics were being kept and then it all exploded," assistant commissioner of police for Kollam district K. Laljy told AFP.

The Press Trust Of India said, however, that the fire erupted after firecrackers kept in a storeroom on the temple's complex ignited.

Fires and stampedes are common at temples and during religious occasions, often because of poor security arrangements and lax safety standards.

The fire comes as Kerala, governed by the Congress party, which is in opposition at the national level, heads to the polls in one of five state elections being held in India this month and next.