  The time and angle dependent line and continuum emission from a dense torus
around a cosmological gamma-ray burst source is simulated, taking into account
photoionization, collisional ionization, recombination, and electron heating
and cooling due to various processes. The importance of the hydrodynamical
interaction between the torus and the expanding blast wave is stressed. Due to
the rapid deceleration of the blast wave as it interacts with the dense torus,
the material in the torus will be illuminated by a drastically different photon
spectrum than observable through a low-column-density line of sight, and will
be heated by the hydrodynamical interaction between the blast wave and the
torus. A model calculation to reproduce the Fe K-alpha line emission observed
in the X-ray afterglow of GRB 970508 is presented. The results indicate that ~
10^{-4} solar masses of iron must be concentrated in a region of less than
10^{-3} pc. The illumination of the torus material due to the hydrodynamic
interaction of the blast wave with the torus is the dominant heating and
ionization mechanism leading to the formation of the iron line. These results
suggest that misaligned GRBs may be detectable as X-ray flashes with pronounced
iron emission line features.
