  We have investigated the oxygen and nitrogen chemical abundances in extremely
compact star-forming galaxies with redshifts between $\sim$0.11-0.35, popularly
referred to as "green peas". Direct and strong-line methods sensitive to the
N/O ratio applied to their SDSS spectra reveals that these systems are genuine
metal-poor galaxies, with mean oxygen abundances 20% solar. At a given
metallicity these galaxies display systematically large N/O ratios compared to
normal galaxies, which can explain the strong difference between our
metallicities measurements and previous ones. While their N/O ratios follow the
relation with stellar mass of local star-forming galaxies in the SDSS, we find
that the mass--metallicity relation of the "green peas" is offset $\ga$0.3 dex
to lower metallicities. We argue that recent interaction-induced inflow of gas,
possibly coupled with a selective metal-rich gas loss, driven by supernova
winds, may explain our findings and the known galaxy properties, namely high
specific star formation rates, extreme compactness, and disturbed optical
morphologies. The "green pea" galaxy properties seem to be not common in the
nearby Universe, suggesting a short and extreme stage of their evolution.
Therefore, these galaxies may allow us to study in great detail many processes,
such as starburst activity and chemical enrichment, under physical conditions
approaching those in galaxies at higher redshifts.
