Semiempirical OM2/MRCI surface-hopping simulations have been performed to study the trans-to-cis photoisomerization of azobenzene upon excitation to the S1 state. The decay dynamics to the ground state shows an oscillatory pattern that can be attributed to an out-of-plane rotation of the N2 moiety. The reaction is thus initially driven by N2 rotation which triggers phenyl rotations around the C-N bonds. The cis isomer is produced most effectively when the phenyl rings rotate in phase. Mode-specific excitations cause variations in the computed decay times and product yields.