  We estimate the effect of the spectator-induced electromagnetic interaction
on the directed flow of charged pions. For intermediate centrality Au+Au
collisions at $\sqrt{s_{NN}}=7.7$~GeV, we demonstrate that the electromagnetic
interaction between spectator charges and final state pions results in charge
splitting of positive and negative pion directed flow. Such a charge splitting
is visible in the experimental data reported by the STAR Collaboration.
  The magnitude of this charge splitting appears to strongly depend on the
actual distance between the pion emission site (pion at freeze-out) and the
spectator system. As such, the above electromagnetic effect brings new,
independent information on the space-time evolution of pion production in heavy
ion collisions.
  From the comparison of our present analysis to our earlier studies made for
pions produced at higher rapidity, we formulate conclusions on the rapidity
dependence of the distance between the pion emission site and the spectator
system. This distance appears to decrease with increasing pion rapidity,
reflecting the longitudinal expansion of the strongly-interacting system
responsible for pion emission. Thus for the first time, information on the
space-time characteristics of the system is being provided by means of the
spectator-induced electromagnetic interaction.
  The above electromagnetic effect being in fact a straight-forward consequence
of the presence of spectator charges in the collision, we consider that it
should be considered as a baseline for studies of other phenomena, like those
related to the electric conductivity of the quark-gluon plasma.
