  We present the gas-phase oxygen abundance (O/H) for a sample of 131
star-forming galaxies at intermediate redshifts ($0.2<z<1.0$). The sample
selection, the spectroscopic observations (mainly with VLT/FORS) and associated
data reduction, the photometric properties, the emission-line measurements, and
the spectral classification are fully described in a companion paper (Paper I).
We use two methods to estimate the O/H abundance ratio: the {} "standard"
$R\_{\mathrm{23}}$ method which is based on empirical calibrations, and the
CL01 method which is based on grids of photo-ionization models and on the
fitting of emission lines. For most galaxies, we have been able to solve the
problem of the metallicity degeneracy between the high- and low-metallicity
branches of the O/H vs. $R\_{\mathrm{23}}$ relationship using various secondary
indicators. The luminosity -- metallicity ($L-Z$) relation has been derived in
the $B$- and $R$-bands, with metallicities derived with the two methods
($R\_{\mathrm{23}}$ and CL01). In the analysis, we first consider our sample
alone and then a larger one which includes other samples of
intermediate-redshift galaxies drawn from the literature. The derived $L-Z$
relations at intermediate redshifts are very similar (same slope) to the $L-Z$
relation obtained for the local universe. Our sample alone only shows a small
evolution of the $L-Z$ relation with redshift up to $z\sim1.0$. We only find
statistical variations consistent with the uncertainty in the derived
parameters. Including other samples of intermediate-redshift galaxies, we find
however that galaxies at $z\sim1$ appear to be metal-deficient by a factor of
$\sim3$ compared with galaxies in the local universe. For a given luminosity,
they contain on average about one third of the metals locked in local galaxies.
