A thin-film magnetic device comprises, on a substrate, a composite assembly deposited by cathode sputtering and consists of a first layer made of a ferromagnetic material with a high rate of spin polarization, the magnetization of which is in plane in the absence of any electric or magnetic interaction, a second layer made of a magnetic material with high perpendicular anisotropy, the magnetization of which is outside the plane of said layer in the absence of any electric or magnetic interaction, and coupling of which with said first layer induces a decrease in the effective demagnetizing field of the entire device, a third layer that is in contact with the first layer via its interface opposite to that which is common to the second layer and made of a material that is not magnetic and not polarizing for electrons passing through the device.