Another 38 people were injured at the factory near the city of Arak, 290 km (180 miles) southwest of the capital Tehran, many of them critically, IRNA said.
A container holding 60,000 litres of inflammable products exploded during welding work nearby and the fire quickly spread to other parts of the plant, it said, citing eye witnesses.
There was extensive damage within 500 metres of the explosion, with many vehicles destroyed and the roofs of buildings collapsing.
Many of the dead were burnt beyond recognition and 23 of the injured suffered burns of 70 percent or more, the witnesses said.
Provincial officials said most of the factory had been destroyed but that the fire had been brought under control, the Mehr News Agency said.