The Stark effect is the shifting and splitting of spectral lines of atoms and molecules due to the presence of an external electric field. It is the electric-field analogue of the Zeeman effect , where a spectral line is split into several components due to the presence of the magnetic field .