  We present the results of high quality long-slit spectroscopy of planetary
nebulae (PNe) and HII regions in the two dwarf irregular galaxies Sextans A and
B, which belong to a small group of galaxies just outside the Local Group. In
Sextans A we obtained the element abundances in its only known PN and in three
HII regions with the classical Te method. The oxygen abundances in these three
HII regions of Sextans A are all consistent within the individual rms
uncertainties, with the average 12+log(O/H) = 7.54+/-0.06. The oxygen abundance
of the PN in Sextans A is, however, significantly higher: 12+$\log$(O/H) =
8.02+/-0.05. This PN is even more enriched in nitrogen and helium, suggesting a
classification as a PN of Type I. In Sextans B we obtained spectra of one PN
and six HII regions. Element abundances with the Te method could be derived for
the PN and three of the HII regions. For two of these HII regions, which have a
separation of only ~70 pc in projection, the oxygen abundances do not differ
within the rms uncertainties, with a mean of 12+log(O/H) = 7.53+/-0.05. The
third HII region, which is about 0.6 kpc northeast from the former two, is
twice as metal-rich, with 12+log(O/H) = 7.84+/-0.05. This suggests considerable
inhomogeneity in the present-day metallicity distribution in Sextans B.
(Abridged)
