The metallicity of the progenitor system producing a type Ia supernova (SN Ia) could play a role in its maximum luminosity, as suggested by theoretical predictions. We present an observational study to investigate if such a relationship exists. Using the 4.2 m William Herschel Telescope (WHT) we have obtained intermediate-resolution spectroscopy data of a sample of 28 local galaxies hosting SNe Ia, for which distances have been derived using methods independent of those based on SN Ia parameters. From the emission lines observed in their optical spectra, we derived the gas-phase oxygen abundance in the region where each SN Ia exploded. Our data show a trend, with an 80% of chance not being due to random fluctuation, between SNe Ia absolute magnitudes and the oxygen abundances of the host galaxies, in the sense that luminosities tend to be higher for galaxies with lower metallicities. This result seems likely to be in agreement with both the theoretically expected behavior and with other observational results. This dependence MB-Z might induce systematic errors when it is not considered when deriving SNe Ia luminosities and then using them to derive cosmological distances.