Erbium is incorporated in crystalline silicon during molecular beam epitaxy on Si(100) at 600 degrees C, either in vacuum (6x10(-11) mbar) or in an O-2 ambient (4x10(-10) mbar). Strong Er segregation takes place during growth in vacuum, and only 23% of the total deposited Er is incorporated in the epitaxial layer. Films grown in an O-2 ambient show no Er segregation, and an Er concentration of 1.5x10(19) Er/cm(3) is incorporated in the crystal. The O content is 4x10(19) O/cm(3). Photoluminescence spectra taken at 10 K show the characteristic intra-4f luminescence of Er3+ at 1.54 mu m for both samples, grown with and without O-2. Differences found in the spectral shape indicate a difference in the local environment (presumably O coordination) of Er for the two cases. The O codoped film shows a 7 times higher Er luminescence peak intensity than the film grown without O. This is due to the higher incorporated Er concentration as well as an increased luminescence efficiency (lifetime without O: 0.33 ms, with O: 1.81 ms). The Er excitation efficiency is lower in the O codoped film than in the O-undoped film, which is attributed to the lower minority carrier lifetime in the O-doped material. Thermal annealing of the O codoped film at 1000 degrees C increases the excitation efficiency and hence the Er luminescence intensity. (C) 1996 American Institute of Physics.