  We present a self-consistent study of the stellar populations and the ionized
gas in a sample of 10 HII galaxies with, at least, four measured electron
temperatures and a precise determination of ionic abundances following the
"direct method". We fitted the spectral energy distribution of the galaxies
using the program STARLIGHT in order to quantify the contribution of the
underlying stellar population to EW(Hbeta), which amounts to about 10% for most
of the objects. We then studied the Wolf-Rayet stellar populations detected in
seven of the galaxies. The presence of these populations and the corrected
EW(Hbeta) values indicate that the ionizing stellar populations were created
following a continuous star formation episode of 10 Myr duration, hence WR
stars may be present in all of objects even if they are not detected in some of
them. The derived stellar features, the number of ionizing photons and the
relative intensities of the strongest emission lines were used as input
parameters to compute tailored models with the photoionization code CLOUDY. Our
models are able to y reproduce their thermal and ionization structure as
deduced from their collisionally excited emission lines and, hence, no
abundance discrepancy factors are implied for this kind of objects. Only the
electron temperature of S+ is overestimated by the models, pointing to the
possible presence of outer shells of diffuse gas in these objects. This kind of
geometrical effects can affect the determination of the equivalent effective
temperature of the ionizing cluster using calibrators which depend on
low-excitation emission lines.
