  We estimate the electromagnetic effect of the spectator charge on azimuthal
anisotropies observed in heavy ion collisions. For peripheral Pb+Pb reactions
at the top energy of the CERN Super Proton Synchrotron, $\sqrt{s_{NN}}=17.3$
GeV, we predict this effect to bring very large distortions to the observed
directed flow, $v_1$, of positive and negative pions emitted close to beam
rapidity. The overall magnitude of this effect is comparable to values of $v_1$
reported by the WA98 experiment. We argue that also at lower rapidities, the
spectator induced electromagnetic effect may result in the splitting of values
of $v_1$ observed for positive and negative pions. Such a splitting is visible
in the data reported by the STAR Collaboration from the RHIC Beam Energy Scan.
  Both effects are sensitive to the space-time scenario assumed for pion
emission. Therefore, they bring new information on the collision dynamics.
