The factory was completely destroyed after the explosion.

The Punjab police today said the firecracker factory in which the blast took place in Batala killing 23 people and injuring 27 was "illegal" even as rescue operations continued at the explosion site.

Teams of National Disaster Response Force (NDRF) are trying to find out any people still trapped under the debris, officials said.

Batala Senior Superintendent of Police Opinderjit Singh said: "The factory was working illegally. I didn't come to know about it earlier, otherwise it would have been closed".

"Now we are checking the licences of all the factories in the Batala city," he added.

Family members of the victims have sought action against higher officials for failing to ensure closure of the firecracker factory despite repeated requests.

They also raised slogans against the district administration while seeking registration of murder case against top officials for allowing the factory to operate illegally from the thickly populated Guru Ram Das colony on the Jalandhar road.

"What inquiry will the government do now... a case of murder should be registered against top officials for allowing the factory to run illegally," a protester said.

Twenty-three people were killed in a blast at the firecracker factory located in a residential area on Jalandhar road in Batala of Gurdaspur district on Wednesday. The explosion also damaged a few buildings nearby.

Several factory workers, some family members of the factory owner and a few passersby were killed in the explosion, officials said. Seven critically injured were referred to Amritsar medical college.

After the post mortem, the bodies will be handed over to the families of victims, they said.

A forensic team from Chandigarh will soon reach the site to take samples, officials said.

In 2017, a similar blast had taken place in the same factory killing one worker and injuring three others, locals said, claiming several complaints were submitted to the district administration in the past for the closure of the factory.

The Punjab government has ordered a magisterial inquiry into the incident.

Rural Development and Panchayat Minister Tript Rajinder Singh Bajwa on Wednesday night met the injured in local hospital.

An ex gratia of Rs 2 lakh for the family of those who died and Rs 50,000 for the seven injured has been announced.

Punjab Chief Minister Amarinder Singh on Wednesday directed the civil and police administration to extend all possible help to the victims' families in this hour of grief.

He had also directed the Deputy Commissioner to provide the best possible treatment to the injured free of cost besides asking the SSP to supervise the evacuation operations being carried out by the NDRF team.

The Gurdaspur district administration is under scanner for negligence and giving a free hand to the cracker factory owner operating in Ram Das colony near Hansali Bridge in Batala.

There were four multi-storey cracker shops after the family business of Satnam Singh split among his four sons, including Jaspal Singh, Paramjit Singh, Harbhajan Singh and Ravil Singh, in the market.

All the factory-cum shops except Jaspal Singh's were operating illegally as no licenses were issued. Being an eldest of his family, Jaspal Singh got his father's permit which was not renewed by the administration, the police said.

Baljit Singh, a key witness in the blast case, said that the family of Satnam Singh had lived in a house on the backside of the shop and a stock of raw material was often hidden in the house.

He said that the owners had stocked the bulk quantity of material before festivals like Dusherra, Gurpurab and Diwali.

Deputy Commissioner Gurdaspur Vipul Ujwal said that as many as 19 dead bodies have been identified, out of which five belonged to the family of the owner. They were identified as Surinder Singh, Paramjit Singh, Onkar Singh, Vikramjit Singh, and Rajinderpal Singh besides, workers who died in the blast.

Three civilians also died -- Bimala Rani, Ramandeep Kaur and Pahulpreet Singh of Ram Das colony, the police said.

Raghubir Singh Sandhu, president of Bar association Batala, who is residing in Guru Ram Das colony, said: "I, along with other residents of locality, requested the administration to shift this fire cracker factory outside the city after the 2017 incident but all in vain."