A magnetoresistance effect element (MR element) for use in a thin-film magnetic head has a buffer layer, an antiferromagnetic layer, a pinned layer, a spacer layer, a free layer, and a cap layer that are successively stacked. A sense current flows in a direction perpendicular to layer surfaces via a lower shield layer and an upper shield layer. The pinned layer comprises an outer layer having a fixed magnetization direction, a nonmagnetic intermediate layer, and an inner layer in the form of a ferromagnetic layer. The spacer layer comprises a first nonmagnetic metal layer, a semiconductor layer made of ZnO, and a second nonmagnetic metal layer. The inner layer or the outer layer includes a diffusion blocking layer made of an oxide of an element whose electronegativity is equal to or smaller than Zn, e.g., ZnO, TaO, ZrO, MgO, TiO, or HfO, or made of RuO.