A three-storey factory collapsed on Monday in Lahore after a gas explosion, killing at least five people and trapping dozens, emergency officials said.

"The factory has completely collapsed and two houses next to it as well," an emergency official at the site told Reuters by telephone, adding that narrow streets was preventing heavy rescue machinery from reaching the area.

Karamat Ali, a spokesman for the government Rescue 1122 emergency service, said five dead, including a 10-year-old boy, and 13 survivors had been pulled out of the rubble.

Most of the trapped labourers were males aged 14-23. Seventeen women and girls were also in the factory, which produced veterinary medical products, when it crumbled. The death toll was expected to rise.

"I was inside the building when the blast happened," said Asad, an eight-year-old who was a labourer in the factory . "Two other boys were with me and they started running. I don't know where they went and if they are alive."

The incident is likely to raise fresh questions about Pakistan's industrial safety. Building and zoning regulations are weak and often not enforced, critics say.

Emergency workers and residents were shifting rubble by hand as authorities struggled to move a large crane to the site.

"We are looking for voids in the destruction where there are likely to be survivors," Rizwan Naseer, head of Rescue 1122, told reporters at the site.

A senior city official said the factory should not have been operating.

"The factory was supposed to be sealed. We will investigate why it was still running," city official Ahad Cheema told reporters.

It was not clear why it had been ordered sealed.

"My house is near the factory. I felt a strong jolt and my house shook. I thought it was a bombing," said Awais Raza.

It should be mentioned that it was second such incident in the same area during recent weeks.

Chief Minister Punjab, Mian Shahbaz Sharif taking notice of factory roof collapse incident has sought the details.

Muttahida Qaumi Movement (MQM) chief Altaf Hussain expressing grief over causalities and injuries in factory roof collapse has demanded judicial inquiry into the incident. He asked the party activists to partake in the relief efforts, adding it is criminal to establish a medicine factory in the residential area.