Implantation of 18O into highly B-doped and undoped silicon provides the possibility to investigate the effect of B-doping and to distinguish the processes of in-diffusion and out-diffusion of oxygen by profiling of 16O and 18O, respectively. The simultaneous in- and outdiffusion of oxygen was observed at 1000°C under oxidizing conditions. For silicon, heavily Bdoped to concentrations of 1019 B cm-3, oxygen tends to diffuse out toward the surface. Moreover, a fraction of the oxygen from both sources, implanted 18O and in-diffused 16O, also migrates deep into the substrate and is trapped far beyond the mean ion range RP in the depth of x 3RP at the so-called trans-RP gettering peak. In undoped silicon oxygen accumulation only takes place at vacancy-type defects introduced by ion implantation at a position shallower than RP. The mobility of oxygen implanted into B-doped Si is higher than for implantation into undoped Si. Highly mobile defects are suggested to be formed in B-doped silicon beside the common mobile interstitial oxygen, Oi, and the immobile SiOX precipitates. These I OXBY defects may involve selfinterstitials, I, and O and B atoms. The trans-RP peak appears due to the decay of these defects and the segregation of their constituents.