We numerically investigate the competition between phase separation and dynamical arrest in a colloidal system interacting via a short-ranged attractive potential. Equilibrium fluid configurations are quenched at two different temperatures below the critical temperature and followed during their time evolution. At the lowest studied T, the phase-separation process is interrupted by the formation of an attractive glass in the dense phase. At the higher T, no arrest is observed and the phase-separation process proceeds endlessly in the simulated time window. The final structure of the glass retains memory of the interrupted phase-separation process in the form of a frozen spinodal decomposition peak, whose location and amplitude is controlled by the average packing fraction. We also discuss the time evolution of the nonergodicity parameter, providing evidence of a progressively decreasing localization length on increasing the packing fraction. Finally, we confirm that the reported results are independent of the microscopic dynamics. © 2005 American Institute of Physics.