There was extensive damage within 500m 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 per cent or more, the witnesses said.
Provincial officials said most of the factory had been destroyed but that the fire had been brought under control.
Markazi province is one of Iran's main industrial hubs.
It is also home to one of Iran's key nuclear sites, a heavy water reactor which is under construction near Arak.