Molecular dynamics calculations of the photodissociation of HCl and Cl2 in a Xe crystal have been performed using diatomics-in-molecules (DIM) Hamiltonians to describe the electronic interaction. Nonadiabatic transitions between the adiabatic states are explicitly taken into account in the equations of motion. It is shown that the transitions occur on a subpicosecond-time scale. They induce fast recombination of the fragments, thus leading to a reduction of the quantum yield of permanent dissociation. In addition to the octahedral and tetrahedral interstitial sites the DIM model predicts two further energy minima for Cl in a Xe crystal. One of them, a D2 site between two neighboring xenon atoms, is populated after dissociation of Cl2. In this case, our calculations led to recombination of the molecule when the system is annealed at temperatures below the onset of thermal diffusion of Cl atoms.