Explosion-proof solenoid operated valve with a terminal box which have a special structure that essentially internally isolates ignition sources, such as those at electrical connections, so that if explosive gases enter from the outside and ignite and explode inside, they will not adversely affect the outside.