Some more workers are feared to be trapped under the debris.
Police sources said lightning struck the Welcome and Paris cracker factories at Terkheda village in Washi tehsil during a thundershower, causing first a blast, and then collapse of slabs.
It was difficult for rescue teams to reach the spot as Terna river was flooded, police said.
Eight bodies have been recovered from the debris so far but they were yet to be identified, police added.