The passivating layer 58 employed in the present invention includes any metal layer such as Ti, TiN, Ta, or TaN which serves as a barrier layer preventing diffusion of moisture, air and other contaminants from contacting with the underlying magnetic layers and the tunnel barrier layer 54.