Excimer laser induced rapid formation of nitride and oxide layers on beryllium samples immersed in liquid nitrogen and water, resp., has been studied. From Rutherford backscattering spectra the amounts of incorporated nitrogen and oxygen were determined. In addition, scanning electron microscopy was used to study the morphology of the irradiated surface and compound formation was confirmed by X-ray diffraction. Our results show that extremely rapid reaction takes place when the laser energy is sufficient to melt the beryllium surface. The amount of reaction is found to be proportional to both the energy density and the number of laser shots, until a nearly stoichiometric layer of Be3N2 or BeO is formed at the surface, at which point the reaction saturates. Growth rates on the order 20 nm per shot are deduced from the data, which is orders of magnitude higher than those achieved by conventional means.