Seven newborn babies died after a fire tore through a children’s hospital in the Indian capital, with people charging into the flames to rescue the infants, police said.

Indian Prime Minister Narendra Modi called the fire and deaths “heart-rending” in a post on social media.

The fire department was called after flames tore through the hospital in Delhi.

But in the crucial first minutes, it was bystanders who spotted the fire and braved the blaze to rescue the newborns.

“All 12 newborn babies were rescued from the hospital with the help of other people,” senior police officer Surendra Choudhary said in a statement, but added that by the time they reached medical attention, six were dead.

The blaze in the hospital broke out hours after a separate fire at an amusement park in India’s western state of Gujarat left 27 dead, including four children.

In that fire – which ripped through a centre with a bowling alley and other games crowded with youngsters – police warned that many of the corpses were so badly burned that it was difficult to identify them.

Fires are common in India due to poor building practices, overcrowding, and a lack of adherence to safety regulations.

“Legal action is being taken against the owner of the hospital,” Choudhary said.

He did not give further details on how the children died.

In addition to the six reported killed, another baby among the 12 brought out of the ward was dead before the fire began, Choudhary said, without elaborating further.

The fire broke out in the New Born Baby Care hospital in Delhi’s Vivek Vihar area.

Delhi Fire Department Director Atul Garg told the Press Trust of India (PTI) news agency that 14 fire trucks were sent to battle the blaze.

“The fire spread too fast due to a blast in an oxygen cylinder,” he said.

Delhi Chief Minister Arvind Kejriwal called the situation “heartbreaking”.

“We all stand with those who lost their innocent children in this accident,” he said on social media.

“The causes of the incident are being investigated, and whoever is responsible for this negligence will not be spared.”

Modi also offered his condolences to those who lost their babies.

“My thoughts are with the bereaved families in this incredibly difficult time,” he wrote on social media. “I pray that those injured recover at the earliest.”

The two fires came as northern India was gripped by intense heat, with temperatures in Delhi hitting 46.8 degrees Celsius (116.2 degrees Fahrenheit) on Saturday, according to the India Meteorological Department.

The hospital was operating without a valid licence, the police said, with the hospital owner and the doctor on duty being arrested. Investigation also found that the hospital did not have fire extinguishers or an emergency exit.