The element and electronic shell selectivity of x-ray resonant magnetic scattering ͑XRMS͒ has been used to investigate the profile of the spin polarization of the 5d electronic states of Ce and La across the rare-earth layers in Ce/Fe and La/Fe multilayers. The magnetic contributions to the diffracted intensities have been measured at low angles, at the L 2 edge of the rare earth. In agreement with previous results from x-ray magnetic circular dichroism ͑XMCD͒ experiments, the La 5d polarization is found to be localized right at the interfaces with the Fe layers, as it is expected from a direct hybridization with the Fe 3d states. In the case of Ce/Fe multilayers where Ce is in an ␣-like electronic state with a complex behavior of the 5d magnetic polarization, the XRMS results obtained for two samples with 10 and 22 Å thick Ce layers indicate that the Ce 5d polarization decreases slowly from the interfaces towards the center of the layers. This is in agreement with previous XMCD results. However, at least for the two samples which have been investigated, XRMS also suggests that the Ce 5d polarization oscillates across the Ce layer with a period equal to the ͑111͒ interplanar distance in ␣ fcc Ce. Though compatible with the XMCD findings, this oscillating behavior cannot be derived from its dependence on the Ce layer thickness because of the decrease of the magnetic polarization which prevents us from observing changes in the sign of the XMCD amplitude. ͓S0163-1829͑99͒04637-8͔ PHYSICAL REVIEW B 1 OCTOBER 1999-I VOLUME 60, NUMBER 13 PRB 60 0163-1829/99/60͑13͒/9662͑13͒/$15.00 9662