A large explosion at a fireworks factory in northern India has killed at least 22 people and caused the building to catch fire and collapse.

Police officer Mukhtiar Singh said 15 other people were injured in the blast in Batala, a town in Punjab state about 460 kilometres (285 miles) north of New Delhi.

Rescue work is continuing at the site.

Deepak Bhatia, a state government administrator, said the cause of the explosion was being investigated.

Rescuers work at the site of an explosion at a fireworks factory in Batala, in the northern Indian state of Punjab
Rescuers work at the site of the explosion (Prabhjot Gill/AP)

The building caught fire after the blast, he said.

Television images showed a brick-lined building that had completely collapsed from the force of the explosion.

News18 television news channel quoted opposition Akali Dal party leader Bikram Singh Mathijia as saying that it was an illegal factory that had existed for years without a licence in a residential area.

Residents complained that authorities had failed to take any action against the factory.

An earlier explosion there in 2017 killed one person, according to the news channel.

People watch rescuers work at the site of an explosion at a fireworks factory in Batala, in the northern Indian state of Punjab
People watch rescuers work at the site (Prabhjot Gill/AP)

Fireworks manufacturing is a big business in India, with firecrackers often used at festivals and weddings.

Many illegal factories produce firecrackers that are cheaper to buy than legally made ones.